{"id":"CVE-2025-38424","summary":"perf: Fix sample vs do_exit()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nperf: Fix sample vs do_exit()\n\nBaisheng Gao reported an ARM64 crash, which Mark decoded as being a\nsynchronous external abort -- most likely due to trying to access\nMMIO in bad ways.\n\nThe crash further shows perf trying to do a user stack sample while in\nexit_mmap()'s tlb_finish_mmu() -- i.e. while tearing down the address\nspace it is trying to access.\n\nIt turns out that we stop perf after we tear down the userspace mm; a\nreceipie for disaster, since perf likes to access userspace for\nvarious reasons.\n\nFlip this order by moving up where we stop perf in do_exit().\n\nAdditionally, harden PERF_SAMPLE_CALLCHAIN and PERF_SAMPLE_STACK_USER\nto abort when the current task does not have an mm (exit_mm() makes\nsure to set current-\u003emm = NULL; before commencing with the actual\nteardown). Such that CPU wide events don't trip on this same problem.","modified":"2026-04-02T12:47:58.431810Z","published":"2025-07-25T14:16:44.846Z","related":["MGASA-2025-0218","MGASA-2025-0219","SUSE-SU-2025:02853-1","SUSE-SU-2025:02923-1","SUSE-SU-2025:02969-1","SUSE-SU-2025:02996-1","SUSE-SU-2025:02997-1","SUSE-SU-2025:03011-1","SUSE-SU-2025:03023-1","SUSE-SU-2025:03204-1","SUSE-SU-2025:20577-1","SUSE-SU-2025:20586-1","SUSE-SU-2025:20601-1","SUSE-SU-2025:20602-1","SUSE-SU-2025:21074-1","SUSE-SU-2025:21139-1","SUSE-SU-2025:21179-1","openSUSE-SU-2025:20081-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38424.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/2ee6044a693735396bb47eeaba1ac3ae26c1c99b"},{"type":"WEB","url":"https://git.kernel.org/stable/c/456019adaa2f5366b89c868dea9b483179bece54"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4f6fc782128355931527cefe3eb45338abd8ab39"},{"type":"WEB","url":"https://git.kernel.org/stable/c/507c9a595bad3abd107c6a8857d7fd125d89f386"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7311970d07c4606362081250da95f2c7901fc0db"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7b8f3c72175c6a63a95cf2e219f8b78e2baad34e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/975ffddfa2e19823c719459d2364fcaa17673964"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a9f6aab7910a0ef2895797f15c947f6d1053160f"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38424.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38424"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"c5ebcedb566ef17bda7b02686e0d658a7bb42ee7"},{"fixed":"7b8f3c72175c6a63a95cf2e219f8b78e2baad34e"},{"fixed":"507c9a595bad3abd107c6a8857d7fd125d89f386"},{"fixed":"a9f6aab7910a0ef2895797f15c947f6d1053160f"},{"fixed":"975ffddfa2e19823c719459d2364fcaa17673964"},{"fixed":"2ee6044a693735396bb47eeaba1ac3ae26c1c99b"},{"fixed":"456019adaa2f5366b89c868dea9b483179bece54"},{"fixed":"7311970d07c4606362081250da95f2c7901fc0db"},{"fixed":"4f6fc782128355931527cefe3eb45338abd8ab39"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38424.json"}}],"schema_version":"1.7.5"}