{"id":7600,"date":"2026-09-04T18:49:37","date_gmt":"2026-09-04T10:49:37","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-74576"},"modified":"2026-09-04T18:49:37","modified_gmt":"2026-09-04T10:49:37","slug":"cve-2026-74576","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-74576","title":{"rendered":"CVE-2026-74576 [HIGH] &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nmm\/slab: prevent unbo"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>mm\/slab: prevent unbounded recursion in free path with new kmalloc type<\/p>\n<p>Commit 280ea9c3154b (&#8220;mm\/slab: avoid allocating slabobj_ext array from<br \/>\nits own slab&#8221;) avoided recursive allocation of obj_exts from kmalloc<br \/>\ncaches of the same size, by bumping the obj_exts array&#8217;s allocation<br \/>\nsize whenever the array size equals the size of the object being<br \/>\nallocated.<\/p>\n<p>However, as reported by Danielle Costantino and Shakeel Butt,<br \/>\neven slabs from kmalloc caches of different sizes can form a cycle<br \/>\nby allocating obj_exts arrays from each other [1]:<\/p>\n<p>  What happened: a KMALLOC_NORMAL slab&#8217;s obj_exts array (used by<br \/>\n  allocation profiling \/ memcg accounting) is itself kmalloc()&#8217;d from a<br \/>\n  KMALLOC_NORMAL cache, so the &#8220;slab holds another slab&#8217;s obj_exts array&#8221;<br \/>\n  relation can form cycles. With sizeof(struct slabobj_ext) == 16 and<br \/>\n  the host&#8217;s geometry:<\/p>\n<p>  &#8211; kmalloc-512 has 64 objects\/slab -&gt; array is 64*16 == 1024 bytes,<br \/>\n    served from kmalloc-1k;<br \/>\n  &#8211; kmalloc-1k  has 32 objects\/slab -&gt; array is 32*16 ==  512 bytes,<br \/>\n    served from kmalloc-512.<\/p>\n<p>  A kmalloc-512 slab and a kmalloc-1k slab therefore hold each other&#8217;s<br \/>\n  obj_exts array.  Discarding one frees the other&#8217;s array, which empties<br \/>\n  and discards that slab, which frees the first&#8217;s array, and so on:<br \/>\n  __free_slab() -&gt; free_slab_obj_exts() -&gt; kfree() -&gt; discard_slab() -&gt;<br \/>\n  __free_slab() recurses along the cycle until the stack is exhausted.<\/p>\n<p>With memory allocation profiling, this allows unbounded recursion<br \/>\nin the free path and led to a stack overflow on a production host in<br \/>\nthe Meta fleet [1]:<\/p>\n<p>  BUG: TASK stack guard page was hit<br \/>\n  Oops: stack guard page<br \/>\n  RIP: 0010:kfree+0x8\/0x5d0<br \/>\n  Call Trace:<br \/>\n   __free_slab+0x66\/0xc0<br \/>\n   kfree+0x3f0\/0x5d0<br \/>\n   &#8230; ( ~125x __free_slab  kfree ) &#8230;<\/p>\n<p>   do_syscall_64<\/p>\n<p>It is proposed [1] to resolve this issue by always serving the obj_exts<br \/>\narray allocation from kmalloc caches (or large kmalloc) of sizes larger<br \/>\nthan the object size. However, as pointed out by Vlastimil Babka [2],<br \/>\nthis can waste an excessive amount of memory as slabs from large<br \/>\nkmalloc sizes (e.g. kmalloc-8k) generally need obj_exts arrays much<br \/>\nsmaller than the object size.<\/p>\n<p>Therefore, rather than bumping the size, let us take a different<br \/>\napproach; disallow formation of cycles between kmalloc types when<br \/>\nallocating obj_exts arrays. Currently, all obj_exts arrays are served<br \/>\nfrom normal kmalloc caches. Cycles cannot be created if obj_exts arrays<br \/>\nof normal kmalloc caches are served from a special kmalloc type that can<br \/>\nnever have obj_exts arrays.<\/p>\n<p>To achieve this, create a new kmalloc type called KMALLOC_NO_OBJ_EXT.<br \/>\nKMALLOC_NO_OBJ_EXT caches are created with SLAB_NO_OBJ_EXT flag when<br \/>\neither 1) memory allocation profiling is not permanently disabled,<br \/>\nor 2) kmalloc types with a priority higher than KMALLOC_CGROUP are<br \/>\naliased with KMALLOC_NORMAL.<\/p>\n<p>Sheaf bootstrapping for KMALLOC_NO_OBJ_EXT caches now must be deferred<br \/>\nbecause allocation of a barn can trigger obj_exts array allocation of<br \/>\nnormal kmalloc caches when the KMALLOC_NO_OBJ_EXT cache for that size<br \/>\nis not ready yet. For simplicity, perform bootstrapping of sheaves for<br \/>\nall kmalloc caches later.<\/p>\n<p>Introduce a new slab alloc flag, SLAB_ALLOC_NO_OBJ_EXT, to prevent<br \/>\nallocation of obj_exts arrays, and let kmalloc_slab() override the type<br \/>\nto KMALLOC_NO_OBJ_EXT when specified. Note that kmalloc_type() remains<br \/>\nunchanged because kmalloc_flags() bypasses the kmalloc fastpath.<\/p>\n<p>Do not pass SLAB_ALLOC_NO_RECURSE to kmalloc_flags() in<br \/>\nalloc_slab_obj_exts() and instead use SLAB_ALLOC_NO_OBJ_EXT only when<br \/>\nthe objects are allocated from normal kmalloc caches. While this<br \/>\nprevents unbounded recursive allocation of obj_exts, it allows<br \/>\nKMALLOC_NO_OBJ_EXT caches to have sheaves.<\/p>\n<p>Since sheaf allocations specify SLAB_ALLOC_NO_RECURSE that prevents<br \/>\nallocation of both sheaves and obj_exts arrays, the recursion depth<br \/>\nis bounded.<\/p>\n<p>obj_exts arrays for non-<br \/>\n&#8212;truncated&#8212;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>mm\/slab: prevent unbounded recursion in free path with new kmalloc type<\/p>\n<p>Commit 280ea9c3154b (&#8220;mm\/slab: avoid allocating slabobj_ex<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-7600","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/7600","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=7600"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7600"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7600"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}