{"id":21466,"date":"2026-09-12T04:31:13","date_gmt":"2026-09-11T20:31:13","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-89544"},"modified":"2026-09-12T04:31:13","modified_gmt":"2026-09-11T20:31:13","slug":"cve-2026-89544","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-89544","title":{"rendered":"CVE-2026-89544 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nSUNRPC: fix gssx_dec_"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>SUNRPC: fix gssx_dec_option_array error path bugs<\/p>\n<p>Four coupled defects in the gssx XDR option-array decoder make the<br \/>\nerror paths unsafe: a NULL deref in the caller, a refcount leak on<br \/>\nthe decoded group_info, and a latent use-after-free that the leak<br \/>\nfix would otherwise expose.<\/p>\n<p>gssx_dec_option_array() sets oa-&gt;count = 1 before allocating<br \/>\noa-&gt;data.  If that allocation fails, -ENOMEM is returned with<br \/>\noa-&gt;count == 1 and oa-&gt;data == NULL.  All other error paths jump<br \/>\nto free_oa: which frees oa-&gt;data and NULLs it but also leaves<br \/>\noa-&gt;count == 1.  The caller trusts the count:<\/p>\n<p>    gssp_accept_sec_context_upcall()<br \/>\n      gssx_dec_accept_sec_context()<br \/>\n        gssx_dec_option_array()        \/* fails, count=1 data=NULL *\/<br \/>\n      data = res.options.data[0].value \/* NULL deref *\/<\/p>\n<p>Independently, free_creds: releases the partially decoded svc_cred<br \/>\nwith a bare kfree(creds).  gssx_dec_linux_creds() installs a<br \/>\ngroups_alloc() result into creds-&gt;cr_group_info; that object is<br \/>\nkvmalloc-backed and refcounted, and only put_group_info() reaches<br \/>\nkvfree().  A plain kfree(creds) drops the wrapper and leaks the<br \/>\ngroup_info allocation.<\/p>\n<p>The natural fix for the leak is to call free_svc_cred(creds) before<br \/>\nkfree(creds), but free_svc_cred() invokes put_group_info() on<br \/>\ncreds-&gt;cr_group_info unconditionally when non-NULL.  The existing<br \/>\nout_free_groups: path in gssx_dec_linux_creds() already called<br \/>\ngroups_free() on that pointer without clearing it, so once<br \/>\nfree_svc_cred() is wired in, the subsequent put_group_info() would<br \/>\ntouch freed memory.<\/p>\n<p>Fix all four together:<\/p>\n<p>  &#8211; Move the oa-&gt;count = 1 assignment below the oa-&gt;data allocation<br \/>\n    so it is never set when oa-&gt;data is NULL.<br \/>\n  &#8211; Reset oa-&gt;count to 0 at free_oa: so count and data stay<br \/>\n    coherent and the caller sees an empty option array.<br \/>\n  &#8211; Call free_svc_cred(creds) before kfree(creds) at free_creds:<br \/>\n    so the refcounted cr_group_info is released.  free_svc_cred()<br \/>\n    either NULL-guards each field explicitly (cr_group_info has<br \/>\n    an if() check) or delegates to a helper that is NULL-safe<br \/>\n    itself (kfree for the string fields, gss_mech_put() which<br \/>\n    guards with if(gm) at gss_mech_switch.c:342), so it is safe<br \/>\n    to call on a partially decoded svc_cred where only<br \/>\n    cr_uid\/cr_gid\/cr_group_info have been written and everything<br \/>\n    else is zero from kzalloc.<br \/>\n  &#8211; In gssx_dec_linux_creds()&#8217;s out_free_groups: path, release<br \/>\n    cr_group_info with put_group_info() rather than groups_free()<br \/>\n    so the teardown matches free_svc_cred()&#8217;s refcount-aware path,<br \/>\n    and clear the pointer so a later free_svc_cred() on the same<br \/>\n    creds does not release it a second time.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>SUNRPC: fix gssx_dec_option_array error path bugs<\/p>\n<p>Four coupled defects in the gssx XDR option-array decoder make the<br \/>\nerror paths u<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-21466","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/21466","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=21466"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=21466"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=21466"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}