{"api_version":"1","generated_at":"2026-12-01T15:25:28+00:00","cve":"CVE-2026-139059","urls":{"html":"https://cve.report/CVE-2026-139059","api":"https://cve.report/api/cve/CVE-2026-139059.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-139059","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-139059"},"summary":{"title":"microblaze: preserve the MSR carry flags across signals","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmicroblaze: preserve the MSR carry flags across signals\n\nsetup_sigcontext() and restore_sigcontext() copy r0-r31, pc, ear, esr and\nfsr to and from the signal frame but never touch MSR.  The interrupted\nMSR is therefore dropped from the signal context entirely: the handler's\nucontext does not expose it, a handler cannot adjust the resumed\narithmetic flags through uc_mcontext.regs.msr, and -- because\nrestore_sigcontext() leaves regs->msr as whatever the rt_sigreturn trap\nleft in it -- the interrupted context resumes with the carry produced by\nthe syscall entry path (_user_exception does \"addi r14, r14, 4\", which\nwrites carry), not with its own.\n\nOther architectures round-trip the user-visible flags through the signal\nframe (arm's cpsr, csky's carry, x86's eflags), so a handler can both read\nand adjust the resumed flags; purely privileged status registers such as\nriscv's sstatus are left out.  MicroBlaze should do the same for the\nuser-writable bits.\n\nConcretely, MSR[C] (carry) is lost across signal delivery.  Code that\nkeeps a live carry across a point where a signal can be delivered -- for\nexample an lwx/swx compare-and-swap retry loop, between the swx and the\ncarry test -- resumes with the handler's carry and mis-evaluates the\nresult; the same failure class as the rt_sigreturn r3/r4 clobber, reached\nthrough a different register.  Demonstrated under qemu-system-microblazeel\n(machine petalogix-s3adsp1800): a handler that sets MSR_C in\nuc_mcontext.regs.msr has no effect before this change (0 of 132 in-window\nsignals propagated) and takes effect after (130 of 132).\n\nSave MSR in setup_sigcontext() so the handler's ucontext exposes it.  The\nsignal frame is user-writable, so restore_sigcontext() must not restore it\nverbatim: MicroBlaze packs the user-writable carry (MSR_C, MSR_CC) and the\nprivileged control bits (MSR_UM, MSR_VM, MSR_IE, MSR_EE, ...) into the one\nregister, and a verbatim restore would let userspace alter privileged\nreturn state -- rtbd derives the resumed mode from MSR_UMS/MSR_VMS.\nRestore only MSR_C | MSR_CC from the frame and keep the rest from the\ncurrent regs->msr.  This mirrors x86's\nrestore_sigcontext(), which masks the restored EFLAGS to FIX_EFLAGS for\nthe same reason; arches whose status register is purely privileged (e.g.\nriscv sstatus) simply do not restore it at all.\n\nComment on the exposed MSR reworded: it is not read-only,\nrestore_sigcontext() applies MSR_C|MSR_CC from the frame.  Author's\nSigned-off-by kept; he agreed to comment and changelog cleanups.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:18:12","updated_at":"2026-11-30 14:18:12"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/ea2ec2c505099d3a0f3ee8a1d282fe44e211f4c4","name":"https://git.kernel.org/stable/c/ea2ec2c505099d3a0f3ee8a1d282fe44e211f4c4","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/d73722aafce9ac78731f96e2d7865f126797b5eb","name":"https://git.kernel.org/stable/c/d73722aafce9ac78731f96e2d7865f126797b5eb","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/ca35dd21a5f8343f47a23e4e5b3f0ffccf76a4ae","name":"https://git.kernel.org/stable/c/ca35dd21a5f8343f47a23e4e5b3f0ffccf76a4ae","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/91d2e032ad06f5606c281aada7ff2f1c104f3dff","name":"https://git.kernel.org/stable/c/91d2e032ad06f5606c281aada7ff2f1c104f3dff","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/54b66ea6322045d049d2f621dd1fd6ab98b1ae63","name":"https://git.kernel.org/stable/c/54b66ea6322045d049d2f621dd1fd6ab98b1ae63","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/99c46dfc82544c0adb2ea7d30c6b39e53880aa2b","name":"https://git.kernel.org/stable/c/99c46dfc82544c0adb2ea7d30c6b39e53880aa2b","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/1f8722a7053ffe11eff0ee402b7c5150dc808089","name":"https://git.kernel.org/stable/c/1f8722a7053ffe11eff0ee402b7c5150dc808089","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/560fb159ad7bb7765686da8d10d568f9f7270e88","name":"https://git.kernel.org/stable/c/560fb159ad7bb7765686da8d10d568f9f7270e88","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-139059","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139059","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2148daa9c45ff4f91b5890f2a453e3130288064c 99c46dfc82544c0adb2ea7d30c6b39e53880aa2b git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2148daa9c45ff4f91b5890f2a453e3130288064c ea2ec2c505099d3a0f3ee8a1d282fe44e211f4c4 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2148daa9c45ff4f91b5890f2a453e3130288064c 91d2e032ad06f5606c281aada7ff2f1c104f3dff git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2148daa9c45ff4f91b5890f2a453e3130288064c 54b66ea6322045d049d2f621dd1fd6ab98b1ae63 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2148daa9c45ff4f91b5890f2a453e3130288064c d73722aafce9ac78731f96e2d7865f126797b5eb git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2148daa9c45ff4f91b5890f2a453e3130288064c 1f8722a7053ffe11eff0ee402b7c5150dc808089 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2148daa9c45ff4f91b5890f2a453e3130288064c 560fb159ad7bb7765686da8d10d568f9f7270e88 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2148daa9c45ff4f91b5890f2a453e3130288064c ca35dd21a5f8343f47a23e4e5b3f0ffccf76a4ae git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2.6.30","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 2.6.30 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.10.275 5.10.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.15.226 5.15.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.193 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.163 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.117 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.63 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.4 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["arch/microblaze/kernel/signal.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"99c46dfc82544c0adb2ea7d30c6b39e53880aa2b","status":"affected","version":"2148daa9c45ff4f91b5890f2a453e3130288064c","versionType":"git"},{"lessThan":"ea2ec2c505099d3a0f3ee8a1d282fe44e211f4c4","status":"affected","version":"2148daa9c45ff4f91b5890f2a453e3130288064c","versionType":"git"},{"lessThan":"91d2e032ad06f5606c281aada7ff2f1c104f3dff","status":"affected","version":"2148daa9c45ff4f91b5890f2a453e3130288064c","versionType":"git"},{"lessThan":"54b66ea6322045d049d2f621dd1fd6ab98b1ae63","status":"affected","version":"2148daa9c45ff4f91b5890f2a453e3130288064c","versionType":"git"},{"lessThan":"d73722aafce9ac78731f96e2d7865f126797b5eb","status":"affected","version":"2148daa9c45ff4f91b5890f2a453e3130288064c","versionType":"git"},{"lessThan":"1f8722a7053ffe11eff0ee402b7c5150dc808089","status":"affected","version":"2148daa9c45ff4f91b5890f2a453e3130288064c","versionType":"git"},{"lessThan":"560fb159ad7bb7765686da8d10d568f9f7270e88","status":"affected","version":"2148daa9c45ff4f91b5890f2a453e3130288064c","versionType":"git"},{"lessThan":"ca35dd21a5f8343f47a23e4e5b3f0ffccf76a4ae","status":"affected","version":"2148daa9c45ff4f91b5890f2a453e3130288064c","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["arch/microblaze/kernel/signal.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"2.6.30"},{"lessThan":"2.6.30","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"5.10.*","status":"unaffected","version":"5.10.275","versionType":"semver"},{"lessThanOrEqual":"5.15.*","status":"unaffected","version":"5.15.226","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.193","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.163","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.117","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.63","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.4","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.10.275","versionStartIncluding":"2.6.30","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.15.226","versionStartIncluding":"2.6.30","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.193","versionStartIncluding":"2.6.30","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.163","versionStartIncluding":"2.6.30","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.117","versionStartIncluding":"2.6.30","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.63","versionStartIncluding":"2.6.30","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.4","versionStartIncluding":"2.6.30","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"2.6.30","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmicroblaze: preserve the MSR carry flags across signals\n\nsetup_sigcontext() and restore_sigcontext() copy r0-r31, pc, ear, esr and\nfsr to and from the signal frame but never touch MSR.  The interrupted\nMSR is therefore dropped from the signal context entirely: the handler's\nucontext does not expose it, a handler cannot adjust the resumed\narithmetic flags through uc_mcontext.regs.msr, and -- because\nrestore_sigcontext() leaves regs->msr as whatever the rt_sigreturn trap\nleft in it -- the interrupted context resumes with the carry produced by\nthe syscall entry path (_user_exception does \"addi r14, r14, 4\", which\nwrites carry), not with its own.\n\nOther architectures round-trip the user-visible flags through the signal\nframe (arm's cpsr, csky's carry, x86's eflags), so a handler can both read\nand adjust the resumed flags; purely privileged status registers such as\nriscv's sstatus are left out.  MicroBlaze should do the same for the\nuser-writable bits.\n\nConcretely, MSR[C] (carry) is lost across signal delivery.  Code that\nkeeps a live carry across a point where a signal can be delivered -- for\nexample an lwx/swx compare-and-swap retry loop, between the swx and the\ncarry test -- resumes with the handler's carry and mis-evaluates the\nresult; the same failure class as the rt_sigreturn r3/r4 clobber, reached\nthrough a different register.  Demonstrated under qemu-system-microblazeel\n(machine petalogix-s3adsp1800): a handler that sets MSR_C in\nuc_mcontext.regs.msr has no effect before this change (0 of 132 in-window\nsignals propagated) and takes effect after (130 of 132).\n\nSave MSR in setup_sigcontext() so the handler's ucontext exposes it.  The\nsignal frame is user-writable, so restore_sigcontext() must not restore it\nverbatim: MicroBlaze packs the user-writable carry (MSR_C, MSR_CC) and the\nprivileged control bits (MSR_UM, MSR_VM, MSR_IE, MSR_EE, ...) into the one\nregister, and a verbatim restore would let userspace alter privileged\nreturn state -- rtbd derives the resumed mode from MSR_UMS/MSR_VMS.\nRestore only MSR_C | MSR_CC from the frame and keep the rest from the\ncurrent regs->msr.  This mirrors x86's\nrestore_sigcontext(), which masks the restored EFLAGS to FIX_EFLAGS for\nthe same reason; arches whose status register is purely privileged (e.g.\nriscv sstatus) simply do not restore it at all.\n\nComment on the exposed MSR reworded: it is not read-only,\nrestore_sigcontext() applies MSR_C|MSR_CC from the frame.  Author's\nSigned-off-by kept; he agreed to comment and changelog cleanups."}],"providerMetadata":{"dateUpdated":"2026-11-30T13:27:29.246Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/99c46dfc82544c0adb2ea7d30c6b39e53880aa2b"},{"url":"https://git.kernel.org/stable/c/ea2ec2c505099d3a0f3ee8a1d282fe44e211f4c4"},{"url":"https://git.kernel.org/stable/c/91d2e032ad06f5606c281aada7ff2f1c104f3dff"},{"url":"https://git.kernel.org/stable/c/54b66ea6322045d049d2f621dd1fd6ab98b1ae63"},{"url":"https://git.kernel.org/stable/c/d73722aafce9ac78731f96e2d7865f126797b5eb"},{"url":"https://git.kernel.org/stable/c/1f8722a7053ffe11eff0ee402b7c5150dc808089"},{"url":"https://git.kernel.org/stable/c/560fb159ad7bb7765686da8d10d568f9f7270e88"},{"url":"https://git.kernel.org/stable/c/ca35dd21a5f8343f47a23e4e5b3f0ffccf76a4ae"}],"title":"microblaze: preserve the MSR carry flags across signals","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-139059","datePublished":"2026-11-30T13:27:29.246Z","dateReserved":"2026-11-30T13:22:15.911Z","dateUpdated":"2026-11-30T13:27:29.246Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:18:12","lastModifiedDate":"2026-11-30 14:18:12","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"139059","Ordinal":"1","Title":"microblaze: preserve the MSR carry flags across signals","CVE":"CVE-2026-139059","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"139059","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nmicroblaze: preserve the MSR carry flags across signals\n\nsetup_sigcontext() and restore_sigcontext() copy r0-r31, pc, ear, esr and\nfsr to and from the signal frame but never touch MSR.  The interrupted\nMSR is therefore dropped from the signal context entirely: the handler's\nucontext does not expose it, a handler cannot adjust the resumed\narithmetic flags through uc_mcontext.regs.msr, and -- because\nrestore_sigcontext() leaves regs->msr as whatever the rt_sigreturn trap\nleft in it -- the interrupted context resumes with the carry produced by\nthe syscall entry path (_user_exception does \"addi r14, r14, 4\", which\nwrites carry), not with its own.\n\nOther architectures round-trip the user-visible flags through the signal\nframe (arm's cpsr, csky's carry, x86's eflags), so a handler can both read\nand adjust the resumed flags; purely privileged status registers such as\nriscv's sstatus are left out.  MicroBlaze should do the same for the\nuser-writable bits.\n\nConcretely, MSR[C] (carry) is lost across signal delivery.  Code that\nkeeps a live carry across a point where a signal can be delivered -- for\nexample an lwx/swx compare-and-swap retry loop, between the swx and the\ncarry test -- resumes with the handler's carry and mis-evaluates the\nresult; the same failure class as the rt_sigreturn r3/r4 clobber, reached\nthrough a different register.  Demonstrated under qemu-system-microblazeel\n(machine petalogix-s3adsp1800): a handler that sets MSR_C in\nuc_mcontext.regs.msr has no effect before this change (0 of 132 in-window\nsignals propagated) and takes effect after (130 of 132).\n\nSave MSR in setup_sigcontext() so the handler's ucontext exposes it.  The\nsignal frame is user-writable, so restore_sigcontext() must not restore it\nverbatim: MicroBlaze packs the user-writable carry (MSR_C, MSR_CC) and the\nprivileged control bits (MSR_UM, MSR_VM, MSR_IE, MSR_EE, ...) into the one\nregister, and a verbatim restore would let userspace alter privileged\nreturn state -- rtbd derives the resumed mode from MSR_UMS/MSR_VMS.\nRestore only MSR_C | MSR_CC from the frame and keep the rest from the\ncurrent regs->msr.  This mirrors x86's\nrestore_sigcontext(), which masks the restored EFLAGS to FIX_EFLAGS for\nthe same reason; arches whose status register is purely privileged (e.g.\nriscv sstatus) simply do not restore it at all.\n\nComment on the exposed MSR reworded: it is not read-only,\nrestore_sigcontext() applies MSR_C|MSR_CC from the frame.  Author's\nSigned-off-by kept; he agreed to comment and changelog cleanups.","Type":"Description","Title":"microblaze: preserve the MSR carry flags across signals"}]}}}