{"id":"CVE-2026-64239","summary":"mm/damon/sysfs-schemes: delete tried region in regions_rmdirs()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/damon/sysfs-schemes: delete tried region in regions_rmdirs()\n\nDAMON sysfs maintains the DAMOS tried region directory objects via a\nlinked list.  When the user requests refresh of the directories, DAMON\nsysfs removes all the region directories first, and then generate updated\nregions directory on the empty space.  The removal function\n(damon_sysfs_scheme_regions_rm_dirs()) only puts the kobj objects. \nDeletion of the container region object from the linked list is done\ninside the kobj release callback function.\n\nIf somehow the callback invocation is delayed, the list will contain\nregions list that gonna be freed.  If the updated region directories\ncreation is started in this situation, the list can be corrupted and\nuse-after-free can happen.\n\nBecause the kobj objects are managed by only DAMON sysfs, the issue cannot\nhappen in normal situation.  But, such delays can be made on kernels that\nbuilt with CONFIG_DEBUG_KOBJECT_RELEASE.  On the kernel, the issue can\nindeed be reproduced like below.\n\n    # damo start --damos_action stat\n    # cd /sys/kernel/mm/damon/admin/kdamonds/0/\n    # for i in {1..10}; do echo update_schemes_tried_regions \u003e state; done\n    # dmesg | grep underflow\n    [   89.296152] refcount_t: underflow; use-after-free.\n\nFix the issue by removing the region object from the list when\ndecrementing the reference count.\n\nAlso update damos_sysfs_populate_region_dir() to add the region object to\nthe list only after the kobject_init_and_add() is success, so that fail of\nkobject_init_and_add() is not leaving the deallocated object on the list.\n\nThe issue was discovered [1] by Sashiko.","modified":"2026-07-26T03:49:09.752502309Z","published":"2026-07-24T15:27:43.057Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64239.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/0ba6c05156d9ff9fc6ca22b7690e2eec9eca66f7"},{"type":"WEB","url":"https://git.kernel.org/stable/c/2c33177023c92e76806c535ddbffaa3d3fc37777"},{"type":"WEB","url":"https://git.kernel.org/stable/c/441f92f7d386b85bad16de49db95a307cba048a2"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a5fa42214de55e43d165144727ce9facb9fc6b08"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c0e37017a452addec873865c94cf7a665663a9b2"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64239.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-64239"},{"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":"9277d0367ba18ef4bb98bafb1209e715844cdf7e"},{"fixed":"c0e37017a452addec873865c94cf7a665663a9b2"},{"fixed":"a5fa42214de55e43d165144727ce9facb9fc6b08"},{"fixed":"0ba6c05156d9ff9fc6ca22b7690e2eec9eca66f7"},{"fixed":"2c33177023c92e76806c535ddbffaa3d3fc37777"},{"fixed":"441f92f7d386b85bad16de49db95a307cba048a2"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-64239.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.6.143"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.93"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.35"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.0.12"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-64239.json"}}],"schema_version":"1.7.5"}