{"id":"AZL-106164","summary":"CVE-2026-98366 affecting package kernel 6.6.157.1-1","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/rxe: validate access flags before swapping the MR's PD\n\nrxe_rereg_user_mr() reassigns mr-\u003eibmr.pd first and only then\nvalidates the IB_MR_REREG_ACCESS argument:\n\n\tif (flags & IB_MR_REREG_PD) {\n\t\trxe_put(old_pd);\n\t\trxe_get(pd);\n\t\tmr-\u003eibmr.pd = ibpd;\n\t}\n\n\tif (flags & IB_MR_REREG_ACCESS) {\n\t\tif (access & ~RXE_ACCESS_SUPPORTED_MR)\n\t\t\treturn ERR_PTR(-EOPNOTSUPP);\n\t\tmr-\u003eaccess = access;\n\t}\n\nBoth flags pass the entry check because RXE_MR_REREG_SUPPORTED is\nIB_MR_REREG_PD | IB_MR_REREG_ACCESS, so a caller can reach the access\ncheck with mr-\u003eibmr.pd already reassigned.\n\nmr-\u003eibmr.pd is owned by the core, which adjusts pd-\u003eusecnt only on the\nsuccess path: ib_uverbs_rereg_mr() jumps to put_new_uobj on a driver error\nwithout undoing the reassignment, so mr-\u003epd == new_pd while the usecnts\nstill charge the MR to orig_pd. ib_dereg_mr_user() then decrements\nnew_pd, whose count can reach zero while a memory window still references\nit; uverbs_free_pd() frees the PD on that count alone and rxe_mw_cleanup()\nwrites to freed memory:\n\n  BUG: KASAN: slab-use-after-free in __rxe_put+0x31/0xa0\n  Write of size 4 at addr ffff8881301dd690 by task rxe_poc/591\n   __rxe_put+0x31/0xa0\n   rxe_mw_cleanup+0x42/0x200\n   __rxe_cleanup+0x115/0x370\n   rxe_dealloc_mw+0x4c/0x80\n  Allocated by task 591:\n   ib_uverbs_alloc_pd+0x258/0x540\n  Freed by task 591:\n   ib_dealloc_pd_user+0x174/0x210\n   uverbs_free_pd+0x8d/0xc0\n   ib_uverbs_dealloc_pd+0x18e/0x1d0\n\nValidate the access flags before mutating any state so the callback either\napplies every requested change or none.","modified":"2026-10-07T14:16:56.510472006Z","published":"2026-10-06T09:18:30Z","upstream":["CVE-2026-98366"],"references":[{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-98366"}],"affected":[{"package":{"name":"kernel","ecosystem":"Azure Linux:3","purl":"pkg:rpm/azure-linux/kernel"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"6.6.157.1-1"}]}],"database_specific":{"source":"https://github.com/microsoft/AzureLinuxVulnerabilityData/blob/main/osv/AZL-106164.json"}}],"schema_version":"1.9.0"}