{"id":"CVE-2025-40348","state":"PUBLISHED","title":"slab: Avoid race on slab->obj_exts in alloc_slab_obj_exts","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nslab: Avoid race on slab->obj_exts in alloc_slab_obj_exts\n\nIf two competing threads enter alloc_slab_obj_exts() and one of them\nfails to allocate the object extension vector, it might override the\nvalid slab->obj_exts allocated by the other thread with\nOBJEXTS_ALLOC_FAIL. This will cause the thread that lost this race and\nexpects a valid pointer to dereference a NULL pointer later on.\n\nUpdate slab->obj_exts atomically using cmpxchg() to avoid\nslab->obj_exts overrides by racing threads.\n\nThanks for Vlastimil and Suren's help with debugging.","publishedAt":"2025-12-16T13:30:22.368Z","updatedAt":"2026-05-11T21:47:37.835Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"715b6a5b41dae39baeaa40d3386b548bb278b9c2","status":"affected","lessThan":"c7af5300d78460fc5037ddc77113ba3dbfe77dc0","versionType":"git"},{"version":"07e38a54cabd9b4de7ceb7f075f29ffa463e458a","status":"affected","lessThan":"7c34feda6a9a203c9744281f1b6671b7dad2012d","versionType":"git"},{"version":"f7381b9116407ba2a429977c80ff8df953ea9354","status":"affected","lessThan":"6ed8bfd24ce1cb31742b09a3eb557cd008533eec","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/slub.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"6.12.54","status":"affected","lessThan":"6.12.56","versionType":"semver"},{"version":"6.17.4","status":"affected","lessThan":"6.17.6","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/slub.c"]}],"references":["https://git.kernel.org/stable/c/c7af5300d78460fc5037ddc77113ba3dbfe77dc0","https://git.kernel.org/stable/c/7c34feda6a9a203c9744281f1b6671b7dad2012d","https://git.kernel.org/stable/c/6ed8bfd24ce1cb31742b09a3eb557cd008533eec"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/40xxx/CVE-2025-40348.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-40348","state":"PUBLISHED","datePublished":"2025-12-16T13:30:22.368Z","dateUpdated":"2026-05-11T21:47:37.835Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T07:20:57.187Z"},"containers":{"cna":{"title":"slab: Avoid race on slab->obj_exts in alloc_slab_obj_exts","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nslab: Avoid race on slab->obj_exts in alloc_slab_obj_exts\n\nIf two competing threads enter alloc_slab_obj_exts() and one of them\nfails to allocate the object extension vector, it might override the\nvalid slab->obj_exts allocated by the other thread with\nOBJEXTS_ALLOC_FAIL. This will cause the thread that lost this race and\nexpects a valid pointer to dereference a NULL pointer later on.\n\nUpdate slab->obj_exts atomically using cmpxchg() to avoid\nslab->obj_exts overrides by racing threads.\n\nThanks for Vlastimil and Suren's help with debugging."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"715b6a5b41dae39baeaa40d3386b548bb278b9c2","status":"affected","lessThan":"c7af5300d78460fc5037ddc77113ba3dbfe77dc0","versionType":"git"},{"version":"07e38a54cabd9b4de7ceb7f075f29ffa463e458a","status":"affected","lessThan":"7c34feda6a9a203c9744281f1b6671b7dad2012d","versionType":"git"},{"version":"f7381b9116407ba2a429977c80ff8df953ea9354","status":"affected","lessThan":"6ed8bfd24ce1cb31742b09a3eb557cd008533eec","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/slub.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"6.12.54","status":"affected","lessThan":"6.12.56","versionType":"semver"},{"version":"6.17.4","status":"affected","lessThan":"6.17.6","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/slub.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/c7af5300d78460fc5037ddc77113ba3dbfe77dc0"},{"url":"https://git.kernel.org/stable/c/7c34feda6a9a203c9744281f1b6671b7dad2012d"},{"url":"https://git.kernel.org/stable/c/6ed8bfd24ce1cb31742b09a3eb557cd008533eec"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T21:47:37.835Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12.54","versionEndExcluding":"6.12.56"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17.4","versionEndExcluding":"6.17.6"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}