{"id":"CVE-2025-38067","state":"PUBLISHED","title":"rseq: Fix segfault on registration when rseq_cs is non-zero","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nrseq: Fix segfault on registration when rseq_cs is non-zero\n\nThe rseq_cs field is documented as being set to 0 by user-space prior to\nregistration, however this is not currently enforced by the kernel. This\ncan result in a segfault on return to user-space if the value stored in\nthe rseq_cs field doesn't point to a valid struct rseq_cs.\n\nThe correct solution to this would be to fail the rseq registration when\nthe rseq_cs field is non-zero. However, some older versions of glibc\nwill reuse the rseq area of previous threads without clearing the\nrseq_cs field and will also terminate the process if the rseq\nregistration fails in a secondary thread. This wasn't caught in testing\nbecause in this case the leftover rseq_cs does point to a valid struct\nrseq_cs.\n\nWhat we can do is clear the rseq_cs field on registration when it's\nnon-zero which will prevent segfaults on registration and won't break\nthe glibc versions that reuse rseq areas on thread creation.","publishedAt":"2025-06-18T09:33:45.518Z","updatedAt":"2026-10-15T01:06:26.314Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d7822b1e24f2df5df98c76f0e94a5416349ff759","status":"affected","lessThan":"48900d839a3454050fd5822e34be8d54c4ec9b86","versionType":"git"},{"version":"d7822b1e24f2df5df98c76f0e94a5416349ff759","status":"affected","lessThan":"3e4028ef31b69286c9d4878cee0330235f53f218","versionType":"git"},{"version":"d7822b1e24f2df5df98c76f0e94a5416349ff759","status":"affected","lessThan":"b2b05d0dc2f4f0646922068af435aed5763d16ba","versionType":"git"},{"version":"d7822b1e24f2df5df98c76f0e94a5416349ff759","status":"affected","lessThan":"eaf112069a904b6207b4106ff083e0208232a2eb","versionType":"git"},{"version":"d7822b1e24f2df5df98c76f0e94a5416349ff759","status":"affected","lessThan":"f004f58d18a2d3dc761cf973ad27b4a5997bd876","versionType":"git"},{"version":"d7822b1e24f2df5df98c76f0e94a5416349ff759","status":"affected","lessThan":"2df285dab00fa03a3ef939b6cb0d0d0aeb0791db","versionType":"git"},{"version":"d7822b1e24f2df5df98c76f0e94a5416349ff759","status":"affected","lessThan":"fd881d0a085fc54354414aed990ccf05f282ba53","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/rseq.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.18","versionType":"semver"},{"version":"5.10.240","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.189","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.146","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.99","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.39","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.14.9","status":"unaffected","lessThanOrEqual":"6.14.*","versionType":"semver"},{"version":"6.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/rseq.c"]}],"references":["https://git.kernel.org/stable/c/48900d839a3454050fd5822e34be8d54c4ec9b86","https://git.kernel.org/stable/c/3e4028ef31b69286c9d4878cee0330235f53f218","https://git.kernel.org/stable/c/b2b05d0dc2f4f0646922068af435aed5763d16ba","https://git.kernel.org/stable/c/eaf112069a904b6207b4106ff083e0208232a2eb","https://git.kernel.org/stable/c/f004f58d18a2d3dc761cf973ad27b4a5997bd876","https://git.kernel.org/stable/c/2df285dab00fa03a3ef939b6cb0d0d0aeb0791db","https://git.kernel.org/stable/c/fd881d0a085fc54354414aed990ccf05f282ba53","https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html","https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html","https://cert-portal.siemens.com/productcert/html/ssa-082556.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/38xxx/CVE-2025-38067.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-38067","state":"PUBLISHED","datePublished":"2025-06-18T09:33:45.518Z","dateUpdated":"2026-10-15T01:06:26.314Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T04:51:23.980Z"},"containers":{"cna":{"title":"rseq: Fix segfault on registration when rseq_cs is non-zero","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nrseq: Fix segfault on registration when rseq_cs is non-zero\n\nThe rseq_cs field is documented as being set to 0 by user-space prior to\nregistration, however this is not currently enforced by the kernel. This\ncan result in a segfault on return to user-space if the value stored in\nthe rseq_cs field doesn't point to a valid struct rseq_cs.\n\nThe correct solution to this would be to fail the rseq registration when\nthe rseq_cs field is non-zero. However, some older versions of glibc\nwill reuse the rseq area of previous threads without clearing the\nrseq_cs field and will also terminate the process if the rseq\nregistration fails in a secondary thread. This wasn't caught in testing\nbecause in this case the leftover rseq_cs does point to a valid struct\nrseq_cs.\n\nWhat we can do is clear the rseq_cs field on registration when it's\nnon-zero which will prevent segfaults on registration and won't break\nthe glibc versions that reuse rseq areas on thread creation."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d7822b1e24f2df5df98c76f0e94a5416349ff759","status":"affected","lessThan":"48900d839a3454050fd5822e34be8d54c4ec9b86","versionType":"git"},{"version":"d7822b1e24f2df5df98c76f0e94a5416349ff759","status":"affected","lessThan":"3e4028ef31b69286c9d4878cee0330235f53f218","versionType":"git"},{"version":"d7822b1e24f2df5df98c76f0e94a5416349ff759","status":"affected","lessThan":"b2b05d0dc2f4f0646922068af435aed5763d16ba","versionType":"git"},{"version":"d7822b1e24f2df5df98c76f0e94a5416349ff759","status":"affected","lessThan":"eaf112069a904b6207b4106ff083e0208232a2eb","versionType":"git"},{"version":"d7822b1e24f2df5df98c76f0e94a5416349ff759","status":"affected","lessThan":"f004f58d18a2d3dc761cf973ad27b4a5997bd876","versionType":"git"},{"version":"d7822b1e24f2df5df98c76f0e94a5416349ff759","status":"affected","lessThan":"2df285dab00fa03a3ef939b6cb0d0d0aeb0791db","versionType":"git"},{"version":"d7822b1e24f2df5df98c76f0e94a5416349ff759","status":"affected","lessThan":"fd881d0a085fc54354414aed990ccf05f282ba53","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/rseq.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.18","versionType":"semver"},{"version":"5.10.240","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.189","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.146","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.99","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.39","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.14.9","status":"unaffected","lessThanOrEqual":"6.14.*","versionType":"semver"},{"version":"6.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/rseq.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/48900d839a3454050fd5822e34be8d54c4ec9b86"},{"url":"https://git.kernel.org/stable/c/3e4028ef31b69286c9d4878cee0330235f53f218"},{"url":"https://git.kernel.org/stable/c/b2b05d0dc2f4f0646922068af435aed5763d16ba"},{"url":"https://git.kernel.org/stable/c/eaf112069a904b6207b4106ff083e0208232a2eb"},{"url":"https://git.kernel.org/stable/c/f004f58d18a2d3dc761cf973ad27b4a5997bd876"},{"url":"https://git.kernel.org/stable/c/2df285dab00fa03a3ef939b6cb0d0d0aeb0791db"},{"url":"https://git.kernel.org/stable/c/fd881d0a085fc54354414aed990ccf05f282ba53"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T21:20:37.845Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.18","versionEndExcluding":"5.10.240"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.18","versionEndExcluding":"5.15.189"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.18","versionEndExcluding":"6.1.146"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.18","versionEndExcluding":"6.6.99"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.18","versionEndExcluding":"6.12.39"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.18","versionEndExcluding":"6.14.9"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.18","versionEndExcluding":"6.15"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html"},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T17:33:36.482Z"}},{"affected":[{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.5","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.5","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.5","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.5","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIPLUS S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.5","status":"affected","lessThan":"*","versionType":"custom"}]}],"references":[{"url":"https://cert-portal.siemens.com/productcert/html/ssa-082556.html"}],"providerMetadata":{"shortName":"siemens-SADP","orgId":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e","dateUpdated":"2026-10-15T01:06:26.314Z"},"x_adpType":"supplier"}]}}}