{"id":"CVE-2026-72431","state":"PUBLISHED","title":"alloc_tag: fix use-after-free in /proc/allocinfo after module unload","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nalloc_tag: fix use-after-free in /proc/allocinfo after module unload\n\nallocinfo_start() only reinitializes the codetag iterator at position 0. \nFor subsequent reads (position > 0), it reuses cached iterator state from\nthe previous batch.  allocinfo_stop() drops mod_lock between read batches,\nwhich allows module unload to complete and free the module memory that the\ncached iterator still references:\n\n  CPU0 (read)                        CPU1 (rmmod)\n  ----                               ----\n  allocinfo_start(pos=0)\n    down_read(mod_lock)\n    allocinfo_show()\n    ...\n  allocinfo_stop()\n    up_read(mod_lock)\n                                     codetag_unload_module()\n                                       kfree(cmod)\n                                       release_module_tags()\n                                     ...\n                                     free_mod_mem()\n  allocinfo_start(pos=N)\n    down_read(mod_lock)\n    // reuses cached iter, skips re-init\n  allocinfo_show()\n    ct->filename   <-- UAF\n\nAfter free_mod_mem() frees the module's .rodata, allocinfo_show()\ndereferences ct->filename, ct->function which point there.\n\nSave the iterator state in allocinfo_next() and resume from it in\nallocinfo_start() with codetag_next_ct(), which detects module removal via\nidr_find() returning NULL and skips to the next module.","publishedAt":"2026-08-15T05:56:46.821Z","updatedAt":"2026-08-17T05:14:31.058Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"9f44df50fee4d2f6cb374177244ccfa9f0a5cc95","status":"affected","lessThan":"37e3e8a2c3bfdd503209f043f8bbfbdcf5a1d92f","versionType":"git"},{"version":"9f44df50fee4d2f6cb374177244ccfa9f0a5cc95","status":"affected","lessThan":"008ceffd44040f809aead6d7bef7cb1210c4149a","versionType":"git"},{"version":"9f44df50fee4d2f6cb374177244ccfa9f0a5cc95","status":"affected","lessThan":"2956268efc457cb05d29c1bf94de1e8e684d7bbc","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["lib/alloc_tag.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.17","versionType":"semver"},{"version":"6.18.40","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.5","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["lib/alloc_tag.c"]}],"references":["https://git.kernel.org/stable/c/37e3e8a2c3bfdd503209f043f8bbfbdcf5a1d92f","https://git.kernel.org/stable/c/008ceffd44040f809aead6d7bef7cb1210c4149a","https://git.kernel.org/stable/c/2956268efc457cb05d29c1bf94de1e8e684d7bbc"],"weaknesses":[],"ingestedAt":"2026-10-29T20:12:58.252Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/72xxx/CVE-2026-72431.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-72431","state":"PUBLISHED","datePublished":"2026-08-15T05:56:46.821Z","dateUpdated":"2026-08-17T05:14:31.058Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-08-09T03:40:39.929Z"},"containers":{"cna":{"title":"alloc_tag: fix use-after-free in /proc/allocinfo after module unload","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nalloc_tag: fix use-after-free in /proc/allocinfo after module unload\n\nallocinfo_start() only reinitializes the codetag iterator at position 0. \nFor subsequent reads (position > 0), it reuses cached iterator state from\nthe previous batch.  allocinfo_stop() drops mod_lock between read batches,\nwhich allows module unload to complete and free the module memory that the\ncached iterator still references:\n\n  CPU0 (read)                        CPU1 (rmmod)\n  ----                               ----\n  allocinfo_start(pos=0)\n    down_read(mod_lock)\n    allocinfo_show()\n    ...\n  allocinfo_stop()\n    up_read(mod_lock)\n                                     codetag_unload_module()\n                                       kfree(cmod)\n                                       release_module_tags()\n                                     ...\n                                     free_mod_mem()\n  allocinfo_start(pos=N)\n    down_read(mod_lock)\n    // reuses cached iter, skips re-init\n  allocinfo_show()\n    ct->filename   <-- UAF\n\nAfter free_mod_mem() frees the module's .rodata, allocinfo_show()\ndereferences ct->filename, ct->function which point there.\n\nSave the iterator state in allocinfo_next() and resume from it in\nallocinfo_start() with codetag_next_ct(), which detects module removal via\nidr_find() returning NULL and skips to the next module."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"9f44df50fee4d2f6cb374177244ccfa9f0a5cc95","status":"affected","lessThan":"37e3e8a2c3bfdd503209f043f8bbfbdcf5a1d92f","versionType":"git"},{"version":"9f44df50fee4d2f6cb374177244ccfa9f0a5cc95","status":"affected","lessThan":"008ceffd44040f809aead6d7bef7cb1210c4149a","versionType":"git"},{"version":"9f44df50fee4d2f6cb374177244ccfa9f0a5cc95","status":"affected","lessThan":"2956268efc457cb05d29c1bf94de1e8e684d7bbc","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["lib/alloc_tag.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.17","versionType":"semver"},{"version":"6.18.40","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.5","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["lib/alloc_tag.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/37e3e8a2c3bfdd503209f043f8bbfbdcf5a1d92f"},{"url":"https://git.kernel.org/stable/c/008ceffd44040f809aead6d7bef7cb1210c4149a"},{"url":"https://git.kernel.org/stable/c/2956268efc457cb05d29c1bf94de1e8e684d7bbc"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-17T05:14:31.058Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17","versionEndExcluding":"6.18.40"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17","versionEndExcluding":"7.1.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17","versionEndExcluding":"7.2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}