{"api_version":"1","generated_at":"2026-11-30T18:46:13+00:00","cve":"CVE-2026-139060","urls":{"html":"https://cve.report/CVE-2026-139060","api":"https://cve.report/api/cve/CVE-2026-139060.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-139060","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-139060"},"summary":{"title":"microblaze: don't clobber r3/r4 restored by rt_sigreturn","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmicroblaze: don't clobber r3/r4 restored by rt_sigreturn\n\nret_from_trap begins by storing the system call return values r3 and r4\nback into the saved user pt_regs.  That is right for an ordinary system\ncall, but sys_rt_sigreturn() returns through the same path and has to be\ntransparent: restore_sigcontext() has just filled pt_regs from the signal\nframe, and every register must reach userspace exactly as saved.  The two\nstores overwrite the restored r3/r4 with whatever the C function left in\nthose registers.\n\nOnly r4 is actually lost, and that follows from how sigreturn is written\neverywhere rather than from chance.  Architectures have sys_rt_sigreturn()\nreturn the restored return-value register precisely so that this writeback\nstores the restored value -- arm returns regs->ARM_r0, riscv and csky\nregs->a0, arc regs->r0 -- and microblaze does the same through\n*rval_p = regs->r3 in restore_sigcontext().  But the entry macros treat r3\nand r4 as a pair, so ret_from_trap writes back two registers while a C\nfunction has only one return value; nothing carries the restored r4.\n\nCommit 791d0a169b91 (\"microblaze: Fix sys_rt_sigreturn_wrapper\") introduced\nthis in v2.6.37.  The old wrapper saved r3/r4 before the call and reloaded\nthem from pt_regs afterwards; switching brlid to brid removed the only\npoint where they were reloaded, and the stores have been overwriting them\never since.\n\nFix it the way the sibling paths already behave: ret_from_irq and\nret_from_exc restore the full register set and do not perform these stores\nat all.  Label the instruction after the stores ret_from_trap_no_rval and\nenter there, biasing r15 by -8 so that the ABI return \"rtsd r15, 8\" lands\non it; naming the entry rather than computing ret_from_trap + 8 keeps it\ncorrect if the number of stores ever changes.  Restoring the old\nsave/reload would work too, but costs four memory accesses and a branch to\nundo damage that is better not done.\n\nAny value the compiler keeps in r4 across a signal is lost.  The tightest\nwindows are the lwx/swx compare-and-swap retry loops gcc emits for atomics:\nin uClibc-ng's libc.so alone, 50 of 364 such loops hold the address in r4.\nThis is not specific to one libc -- musl passes the address as \"r\"(p), and\nglibc has no microblaze atomic-machine.h and so uses gcc's __atomic\nbuiltins, which expand the same way.  Triggering it needs threads plus a\nsignal storm, which is why it survived 15 years.\n\nReproduced on qemu-system-microblazeel (petalogix-s3adsp1800) by running\nthe uClibc-ng NPTL test tst-eintr1 40 times against an unchanged userspace:\non v7.2 built with gcc 16.2.0, 23 of 40 iterations died with SIGSEGV\nwithout this patch and 0 of 40 with it; on v7.0 built with gcc 12.5.0 the\nsame comparison gave 6 of 40 against 0 of 40.  The register dump of a\nfailing iteration shows the signature: a zero r4 and a fault at address 0,\nwhile r3 came back intact.","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/2ab82d62aaf54e178f1829707ef6bd83a31d8304","name":"https://git.kernel.org/stable/c/2ab82d62aaf54e178f1829707ef6bd83a31d8304","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/5545d027ffa2aa99fb6dfefb5c5ccef8e5cc0826","name":"https://git.kernel.org/stable/c/5545d027ffa2aa99fb6dfefb5c5ccef8e5cc0826","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/518805174e7617238295d1f07985bb5ce69c575f","name":"https://git.kernel.org/stable/c/518805174e7617238295d1f07985bb5ce69c575f","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/4cb5736181bd5146c18e02d3498ec78f51cce770","name":"https://git.kernel.org/stable/c/4cb5736181bd5146c18e02d3498ec78f51cce770","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/87f78edf4b3deb58a8405d7eb401312aca7229c8","name":"https://git.kernel.org/stable/c/87f78edf4b3deb58a8405d7eb401312aca7229c8","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/da6829138a39fa3b9ec318ca54ff89af9d94d350","name":"https://git.kernel.org/stable/c/da6829138a39fa3b9ec318ca54ff89af9d94d350","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/a3c8e0d870e9ac754732a07f9ef688589a6bb51a","name":"https://git.kernel.org/stable/c/a3c8e0d870e9ac754732a07f9ef688589a6bb51a","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/3f11e9ef8441e039c635b7acdbad992c1e27f644","name":"https://git.kernel.org/stable/c/3f11e9ef8441e039c635b7acdbad992c1e27f644","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-139060","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139060","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 791d0a169b912220d58e0ce4564d7bf1e68146a8 518805174e7617238295d1f07985bb5ce69c575f git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 791d0a169b912220d58e0ce4564d7bf1e68146a8 2ab82d62aaf54e178f1829707ef6bd83a31d8304 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 791d0a169b912220d58e0ce4564d7bf1e68146a8 a3c8e0d870e9ac754732a07f9ef688589a6bb51a git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 791d0a169b912220d58e0ce4564d7bf1e68146a8 4cb5736181bd5146c18e02d3498ec78f51cce770 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 791d0a169b912220d58e0ce4564d7bf1e68146a8 5545d027ffa2aa99fb6dfefb5c5ccef8e5cc0826 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 791d0a169b912220d58e0ce4564d7bf1e68146a8 87f78edf4b3deb58a8405d7eb401312aca7229c8 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 791d0a169b912220d58e0ce4564d7bf1e68146a8 3f11e9ef8441e039c635b7acdbad992c1e27f644 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 791d0a169b912220d58e0ce4564d7bf1e68146a8 da6829138a39fa3b9ec318ca54ff89af9d94d350 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2.6.37","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 2.6.37 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/entry.S"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"518805174e7617238295d1f07985bb5ce69c575f","status":"affected","version":"791d0a169b912220d58e0ce4564d7bf1e68146a8","versionType":"git"},{"lessThan":"2ab82d62aaf54e178f1829707ef6bd83a31d8304","status":"affected","version":"791d0a169b912220d58e0ce4564d7bf1e68146a8","versionType":"git"},{"lessThan":"a3c8e0d870e9ac754732a07f9ef688589a6bb51a","status":"affected","version":"791d0a169b912220d58e0ce4564d7bf1e68146a8","versionType":"git"},{"lessThan":"4cb5736181bd5146c18e02d3498ec78f51cce770","status":"affected","version":"791d0a169b912220d58e0ce4564d7bf1e68146a8","versionType":"git"},{"lessThan":"5545d027ffa2aa99fb6dfefb5c5ccef8e5cc0826","status":"affected","version":"791d0a169b912220d58e0ce4564d7bf1e68146a8","versionType":"git"},{"lessThan":"87f78edf4b3deb58a8405d7eb401312aca7229c8","status":"affected","version":"791d0a169b912220d58e0ce4564d7bf1e68146a8","versionType":"git"},{"lessThan":"3f11e9ef8441e039c635b7acdbad992c1e27f644","status":"affected","version":"791d0a169b912220d58e0ce4564d7bf1e68146a8","versionType":"git"},{"lessThan":"da6829138a39fa3b9ec318ca54ff89af9d94d350","status":"affected","version":"791d0a169b912220d58e0ce4564d7bf1e68146a8","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["arch/microblaze/kernel/entry.S"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"2.6.37"},{"lessThan":"2.6.37","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.37","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.15.226","versionStartIncluding":"2.6.37","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.193","versionStartIncluding":"2.6.37","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.163","versionStartIncluding":"2.6.37","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.117","versionStartIncluding":"2.6.37","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.63","versionStartIncluding":"2.6.37","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.4","versionStartIncluding":"2.6.37","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"2.6.37","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmicroblaze: don't clobber r3/r4 restored by rt_sigreturn\n\nret_from_trap begins by storing the system call return values r3 and r4\nback into the saved user pt_regs.  That is right for an ordinary system\ncall, but sys_rt_sigreturn() returns through the same path and has to be\ntransparent: restore_sigcontext() has just filled pt_regs from the signal\nframe, and every register must reach userspace exactly as saved.  The two\nstores overwrite the restored r3/r4 with whatever the C function left in\nthose registers.\n\nOnly r4 is actually lost, and that follows from how sigreturn is written\neverywhere rather than from chance.  Architectures have sys_rt_sigreturn()\nreturn the restored return-value register precisely so that this writeback\nstores the restored value -- arm returns regs->ARM_r0, riscv and csky\nregs->a0, arc regs->r0 -- and microblaze does the same through\n*rval_p = regs->r3 in restore_sigcontext().  But the entry macros treat r3\nand r4 as a pair, so ret_from_trap writes back two registers while a C\nfunction has only one return value; nothing carries the restored r4.\n\nCommit 791d0a169b91 (\"microblaze: Fix sys_rt_sigreturn_wrapper\") introduced\nthis in v2.6.37.  The old wrapper saved r3/r4 before the call and reloaded\nthem from pt_regs afterwards; switching brlid to brid removed the only\npoint where they were reloaded, and the stores have been overwriting them\never since.\n\nFix it the way the sibling paths already behave: ret_from_irq and\nret_from_exc restore the full register set and do not perform these stores\nat all.  Label the instruction after the stores ret_from_trap_no_rval and\nenter there, biasing r15 by -8 so that the ABI return \"rtsd r15, 8\" lands\non it; naming the entry rather than computing ret_from_trap + 8 keeps it\ncorrect if the number of stores ever changes.  Restoring the old\nsave/reload would work too, but costs four memory accesses and a branch to\nundo damage that is better not done.\n\nAny value the compiler keeps in r4 across a signal is lost.  The tightest\nwindows are the lwx/swx compare-and-swap retry loops gcc emits for atomics:\nin uClibc-ng's libc.so alone, 50 of 364 such loops hold the address in r4.\nThis is not specific to one libc -- musl passes the address as \"r\"(p), and\nglibc has no microblaze atomic-machine.h and so uses gcc's __atomic\nbuiltins, which expand the same way.  Triggering it needs threads plus a\nsignal storm, which is why it survived 15 years.\n\nReproduced on qemu-system-microblazeel (petalogix-s3adsp1800) by running\nthe uClibc-ng NPTL test tst-eintr1 40 times against an unchanged userspace:\non v7.2 built with gcc 16.2.0, 23 of 40 iterations died with SIGSEGV\nwithout this patch and 0 of 40 with it; on v7.0 built with gcc 12.5.0 the\nsame comparison gave 6 of 40 against 0 of 40.  The register dump of a\nfailing iteration shows the signature: a zero r4 and a fault at address 0,\nwhile r3 came back intact."}],"providerMetadata":{"dateUpdated":"2026-11-30T13:27:29.780Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/518805174e7617238295d1f07985bb5ce69c575f"},{"url":"https://git.kernel.org/stable/c/2ab82d62aaf54e178f1829707ef6bd83a31d8304"},{"url":"https://git.kernel.org/stable/c/a3c8e0d870e9ac754732a07f9ef688589a6bb51a"},{"url":"https://git.kernel.org/stable/c/4cb5736181bd5146c18e02d3498ec78f51cce770"},{"url":"https://git.kernel.org/stable/c/5545d027ffa2aa99fb6dfefb5c5ccef8e5cc0826"},{"url":"https://git.kernel.org/stable/c/87f78edf4b3deb58a8405d7eb401312aca7229c8"},{"url":"https://git.kernel.org/stable/c/3f11e9ef8441e039c635b7acdbad992c1e27f644"},{"url":"https://git.kernel.org/stable/c/da6829138a39fa3b9ec318ca54ff89af9d94d350"}],"title":"microblaze: don't clobber r3/r4 restored by rt_sigreturn","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-139060","datePublished":"2026-11-30T13:27:29.780Z","dateReserved":"2026-11-30T13:22:15.911Z","dateUpdated":"2026-11-30T13:27:29.780Z","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":"139060","Ordinal":"1","Title":"microblaze: don't clobber r3/r4 restored by rt_sigreturn","CVE":"CVE-2026-139060","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"139060","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nmicroblaze: don't clobber r3/r4 restored by rt_sigreturn\n\nret_from_trap begins by storing the system call return values r3 and r4\nback into the saved user pt_regs.  That is right for an ordinary system\ncall, but sys_rt_sigreturn() returns through the same path and has to be\ntransparent: restore_sigcontext() has just filled pt_regs from the signal\nframe, and every register must reach userspace exactly as saved.  The two\nstores overwrite the restored r3/r4 with whatever the C function left in\nthose registers.\n\nOnly r4 is actually lost, and that follows from how sigreturn is written\neverywhere rather than from chance.  Architectures have sys_rt_sigreturn()\nreturn the restored return-value register precisely so that this writeback\nstores the restored value -- arm returns regs->ARM_r0, riscv and csky\nregs->a0, arc regs->r0 -- and microblaze does the same through\n*rval_p = regs->r3 in restore_sigcontext().  But the entry macros treat r3\nand r4 as a pair, so ret_from_trap writes back two registers while a C\nfunction has only one return value; nothing carries the restored r4.\n\nCommit 791d0a169b91 (\"microblaze: Fix sys_rt_sigreturn_wrapper\") introduced\nthis in v2.6.37.  The old wrapper saved r3/r4 before the call and reloaded\nthem from pt_regs afterwards; switching brlid to brid removed the only\npoint where they were reloaded, and the stores have been overwriting them\never since.\n\nFix it the way the sibling paths already behave: ret_from_irq and\nret_from_exc restore the full register set and do not perform these stores\nat all.  Label the instruction after the stores ret_from_trap_no_rval and\nenter there, biasing r15 by -8 so that the ABI return \"rtsd r15, 8\" lands\non it; naming the entry rather than computing ret_from_trap + 8 keeps it\ncorrect if the number of stores ever changes.  Restoring the old\nsave/reload would work too, but costs four memory accesses and a branch to\nundo damage that is better not done.\n\nAny value the compiler keeps in r4 across a signal is lost.  The tightest\nwindows are the lwx/swx compare-and-swap retry loops gcc emits for atomics:\nin uClibc-ng's libc.so alone, 50 of 364 such loops hold the address in r4.\nThis is not specific to one libc -- musl passes the address as \"r\"(p), and\nglibc has no microblaze atomic-machine.h and so uses gcc's __atomic\nbuiltins, which expand the same way.  Triggering it needs threads plus a\nsignal storm, which is why it survived 15 years.\n\nReproduced on qemu-system-microblazeel (petalogix-s3adsp1800) by running\nthe uClibc-ng NPTL test tst-eintr1 40 times against an unchanged userspace:\non v7.2 built with gcc 16.2.0, 23 of 40 iterations died with SIGSEGV\nwithout this patch and 0 of 40 with it; on v7.0 built with gcc 12.5.0 the\nsame comparison gave 6 of 40 against 0 of 40.  The register dump of a\nfailing iteration shows the signature: a zero r4 and a fault at address 0,\nwhile r3 came back intact.","Type":"Description","Title":"microblaze: don't clobber r3/r4 restored by rt_sigreturn"}]}}}