In the Linux kernel, the following vulnerability has been resolved:
riscv: prevent pt_regs corruption for secondary idle threads
Top of the kernel thread stack should be reserved for ptregs. However this is not the case for the idle threads of the secondary boot harts. Their stacks overlap with their ptregs, so both may get corrupted.
Similar issue has been fixed for the primary hart, see c7cdd96eca28 ("riscv: prevent stack corruption by reserving taskptregs(p) early"). However that fix was not propagated to the secondary harts. The problem has been noticed in some CPU hotplug tests with V enabled. The function smpcallin stored several registers on stack, corrupting top of ptregs structure including status field. As a result, kernel attempted to save or restore inexistent V context.
{ "vanir_signatures": [ { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a638b0461b58aa3205cd9d5f14d6f703d795b4af", "signature_type": "Line", "digest": { "threshold": 0.9, "line_hashes": [ "150127410219514310602300661538771830895", "313904561036393381452021030649102499168", "248415291426626289976080140289520420250", "55238230344878173503350704916323385200", "166085871545969531618680949622109804688" ] }, "id": "CVE-2024-38667-03c051e2", "target": { "file": "arch/riscv/kernel/cpu_ops_spinwait.c" }, "deprecated": false, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0c1f28c32a194303da630fca89481334b9547b80", "signature_type": "Line", "digest": { "threshold": 0.9, "line_hashes": [ "150127410219514310602300661538771830895", "313904561036393381452021030649102499168", "248415291426626289976080140289520420250", "55238230344878173503350704916323385200", "166085871545969531618680949622109804688" ] }, "id": "CVE-2024-38667-22e2fadf", "target": { "file": "arch/riscv/kernel/cpu_ops_spinwait.c" }, "deprecated": false, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3090c06d50eaa91317f84bf3eac4c265e6cb8d44", "signature_type": "Function", "digest": { "function_hash": "304863836827759227841652155795817270705", "length": 344.0 }, "id": "CVE-2024-38667-3fadc495", "target": { "file": "arch/riscv/kernel/cpu_ops_spinwait.c", "function": "cpu_update_secondary_bootdata" }, "deprecated": false, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ea22d4195cca13d5fdbc4d6555a2dfb8a7867a9e", "signature_type": "Function", "digest": { "function_hash": "304863836827759227841652155795817270705", "length": 344.0 }, "id": "CVE-2024-38667-41ea1376", "target": { "file": "arch/riscv/kernel/cpu_ops_spinwait.c", "function": "cpu_update_secondary_bootdata" }, "deprecated": false, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3090c06d50eaa91317f84bf3eac4c265e6cb8d44", "signature_type": "Line", "digest": { "threshold": 0.9, "line_hashes": [ "150127410219514310602300661538771830895", "313904561036393381452021030649102499168", "248415291426626289976080140289520420250", "55238230344878173503350704916323385200", "105521730090550013598986576098174059340" ] }, "id": "CVE-2024-38667-4715e797", "target": { "file": "arch/riscv/kernel/cpu_ops_spinwait.c" }, "deprecated": false, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0c1f28c32a194303da630fca89481334b9547b80", "signature_type": "Function", "digest": { "function_hash": "303003893180181908998714541467659418013", "length": 407.0 }, "id": "CVE-2024-38667-4cd1b561", "target": { "file": "arch/riscv/kernel/cpu_ops_sbi.c", "function": "sbi_cpu_start" }, "deprecated": false, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ea22d4195cca13d5fdbc4d6555a2dfb8a7867a9e", "signature_type": "Line", "digest": { "threshold": 0.9, "line_hashes": [ "195839405214967543211734470122375920254", "226380594458998848402799289762413728891", "179538116048886076995887846850297133971", "201988115140725921555802778101157639522" ] }, "id": "CVE-2024-38667-5aa56683", "target": { "file": "arch/riscv/kernel/cpu_ops_sbi.c" }, "deprecated": false, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ea22d4195cca13d5fdbc4d6555a2dfb8a7867a9e", "signature_type": "Line", "digest": { "threshold": 0.9, "line_hashes": [ "150127410219514310602300661538771830895", "313904561036393381452021030649102499168", "248415291426626289976080140289520420250", "55238230344878173503350704916323385200", "105521730090550013598986576098174059340" ] }, "id": "CVE-2024-38667-5b20f396", "target": { "file": "arch/riscv/kernel/cpu_ops_spinwait.c" }, "deprecated": false, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0c1f28c32a194303da630fca89481334b9547b80", "signature_type": "Line", "digest": { "threshold": 0.9, "line_hashes": [ "195839405214967543211734470122375920254", "226380594458998848402799289762413728891", "179538116048886076995887846850297133971", "201988115140725921555802778101157639522" ] }, "id": "CVE-2024-38667-7914fb14", "target": { "file": "arch/riscv/kernel/cpu_ops_sbi.c" }, "deprecated": false, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a638b0461b58aa3205cd9d5f14d6f703d795b4af", "signature_type": "Line", "digest": { "threshold": 0.9, "line_hashes": [ "195839405214967543211734470122375920254", "226380594458998848402799289762413728891", "179538116048886076995887846850297133971", "201988115140725921555802778101157639522" ] }, "id": "CVE-2024-38667-91f0d3a3", "target": { "file": "arch/riscv/kernel/cpu_ops_sbi.c" }, "deprecated": false, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a638b0461b58aa3205cd9d5f14d6f703d795b4af", "signature_type": "Function", "digest": { "function_hash": "304863836827759227841652155795817270705", "length": 344.0 }, "id": "CVE-2024-38667-a5b94e42", "target": { "file": "arch/riscv/kernel/cpu_ops_spinwait.c", "function": "cpu_update_secondary_bootdata" }, "deprecated": false, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0c1f28c32a194303da630fca89481334b9547b80", "signature_type": "Function", "digest": { "function_hash": "304863836827759227841652155795817270705", "length": 344.0 }, "id": "CVE-2024-38667-a80f3665", "target": { "file": "arch/riscv/kernel/cpu_ops_spinwait.c", "function": "cpu_update_secondary_bootdata" }, "deprecated": false, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a638b0461b58aa3205cd9d5f14d6f703d795b4af", "signature_type": "Function", "digest": { "function_hash": "303003893180181908998714541467659418013", "length": 407.0 }, "id": "CVE-2024-38667-ab04523b", "target": { "file": "arch/riscv/kernel/cpu_ops_sbi.c", "function": "sbi_cpu_start" }, "deprecated": false, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3090c06d50eaa91317f84bf3eac4c265e6cb8d44", "signature_type": "Function", "digest": { "function_hash": "303003893180181908998714541467659418013", "length": 407.0 }, "id": "CVE-2024-38667-c8a48b1d", "target": { "file": "arch/riscv/kernel/cpu_ops_sbi.c", "function": "sbi_cpu_start" }, "deprecated": false, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3090c06d50eaa91317f84bf3eac4c265e6cb8d44", "signature_type": "Line", "digest": { "threshold": 0.9, "line_hashes": [ "195839405214967543211734470122375920254", "226380594458998848402799289762413728891", "179538116048886076995887846850297133971", "201988115140725921555802778101157639522" ] }, "id": "CVE-2024-38667-d82bea9b", "target": { "file": "arch/riscv/kernel/cpu_ops_sbi.c" }, "deprecated": false, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ea22d4195cca13d5fdbc4d6555a2dfb8a7867a9e", "signature_type": "Function", "digest": { "function_hash": "303003893180181908998714541467659418013", "length": 407.0 }, "id": "CVE-2024-38667-fb7d1a7f", "target": { "file": "arch/riscv/kernel/cpu_ops_sbi.c", "function": "sbi_cpu_start" }, "deprecated": false, "signature_version": "v1" } ] }