{"id":"CVE-2026-72431","summary":"alloc_tag: fix use-after-free in /proc/allocinfo after module unload","details":"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 \u003e 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-\u003efilename   \u003c-- UAF\n\nAfter free_mod_mem() frees the module's .rodata, allocinfo_show()\ndereferences ct-\u003efilename, ct-\u003efunction 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.","modified":"2026-08-18T03:30:56.847576724Z","published":"2026-08-15T05:56:46.821Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/72xxx/CVE-2026-72431.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/008ceffd44040f809aead6d7bef7cb1210c4149a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/2956268efc457cb05d29c1bf94de1e8e684d7bbc"},{"type":"WEB","url":"https://git.kernel.org/stable/c/37e3e8a2c3bfdd503209f043f8bbfbdcf5a1d92f"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/72xxx/CVE-2026-72431.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-72431"},{"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":"9f44df50fee4d2f6cb374177244ccfa9f0a5cc95"},{"fixed":"37e3e8a2c3bfdd503209f043f8bbfbdcf5a1d92f"},{"fixed":"008ceffd44040f809aead6d7bef7cb1210c4149a"},{"fixed":"2956268efc457cb05d29c1bf94de1e8e684d7bbc"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-72431.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.17.0"},{"fixed":"6.18.40"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.1.5"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-72431.json"}}],"schema_version":"1.9.0"}