{"id":24448,"date":"2026-09-16T20:32:19","date_gmt":"2026-09-16T12:32:19","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-89791"},"modified":"2026-09-16T20:32:19","modified_gmt":"2026-09-16T12:32:19","slug":"cve-2026-89791","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-89791","title":{"rendered":"CVE-2026-89791 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nperf: Fix use-after-f"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>perf: Fix use-after-free when perf mmap() revival races with the last munmap()<\/p>\n<p>perf_mmap_close() drops rb-&gt;mmap_count *without* holding<br \/>\nevent-&gt;mmap_mutex (the refcount_dec_and_test() right before the<br \/>\nrefcount_dec_and_mutex_lock() of event-&gt;mmap_count). A concurrent<br \/>\nperf_mmap_rb() can slot its entire &#8220;revival&#8221; path into that window<br \/>\n(perf_mmap holds event-&gt;mmap_mutex for its whole duration, including<br \/>\nrb_alloc):<\/p>\n<p>  munmap side (perf_mmap_close)          mmap side (perf_mmap_rb)<br \/>\n  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;    &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n  rb-&gt;mmap_count 1 -&gt; 0   (no lock)      (holds event-&gt;mmap_mutex)<br \/>\n                                         inc_not_zero(rb-&gt;mmap_count) fails<br \/>\n                                         ring_buffer_attach(event, NULL)<br \/>\n                                         rb_alloc() + attach new rb<br \/>\n                                         refcount_set(&amp;event-&gt;mmap_count, 1)<br \/>\n  lock; event-&gt;mmap_count 1 -&gt; 0<br \/>\n  ring_buffer_attach(event, NULL)<br \/>\n  ring_buffer_put() -&gt; frees the *new* rb<\/p>\n<p>The revival&#8217;s refcount_set(&amp;event-&gt;mmap_count, 1) is an invisible<br \/>\n1 -&gt; 1 write: the close frees the just-revived buffer although the<br \/>\nother process still has it mapped &#8212; a page-level use-after-free<br \/>\nallowing local privilege escalation to root by any unprivileged user<br \/>\n(default kernel.perf_event_paranoid=2).<\/p>\n<p>Swap the order of the two counter updates: event-&gt;mmap_count is<br \/>\ndropped first via refcount_dec_and_mutex_lock(), so its 1 -&gt; 0<br \/>\ntransition and the ring_buffer_attach() stay serialized with<br \/>\nperf_mmap(). rb-&gt;mmap_count == 0 then implies every event using the<br \/>\nbuffer is detached already, so the result of the rb-&gt;mmap_count drop<br \/>\ncan gate the remaining teardown directly and detach_rest is no longer<br \/>\nneeded.<\/p>\n<p>An earlier fix for this race from Kyle Zeng and David Lee takes<br \/>\nevent-&gt;mmap_mutex around both counter updates [0]; here the not-last<br \/>\nclose stays lockless.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>perf: Fix use-after-free when perf mmap() revival races with the last munmap()<\/p>\n<p>perf_mmap_close() drops rb-&gt;mmap_count *without* ho<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-24448","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/24448","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln"}],"about":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/types\/vuln"}],"wp:attachment":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=24448"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=24448"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=24448"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}