{"id":"CVE-2026-139578","state":"PUBLISHED","title":"RDMA/ionic: Fix XArray initialization to use XArray flags","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/ionic: Fix XArray initialization to use XArray flags\n\nxa_init_flags() takes XArray flags (XA_FLAGS_*), not gfp flags, even\nthough the parameter is typed gfp_t. Passing GFP_ATOMIC leaves both\nlock-type bits clear, so xa_lock_type() resolves to XA_LOCK_NORMAL for\nqp_tbl and cq_tbl.\n\nBoth tables are used with the IRQ-safe accessors: xa_store_irq() with\nGFP_KERNEL from process context, and xa_lock_irqsave() from the event\nqueue path. When a store needs to grow the tree, __xas_nomem() drops\nthe lock using the recorded lock type before allocating:\n\n\tif (gfpflags_allow_blocking(gfp)) {\n\t\txas_unlock_type(xas, lock_type);\n\t\txas->xa_alloc = kmem_cache_alloc_lru(...);\n\t\txas_lock_type(xas, lock_type);\n\t}\n\nWith XA_LOCK_NORMAL that is a plain spin_unlock(), so the sleeping\nGFP_KERNEL allocation runs with interrupts still disabled by\nxa_store_irq(), and lockdep annotates the lock with the wrong class.\n\nGFP_ATOMIC also happens to set __GFP_HIGH (0x20), which collides with\nXA_FLAGS_ACCOUNT (32U) and silently enables memcg accounting of the\nXArray nodes.\n\nUse XA_FLAGS_LOCK_IRQ so the lock type matches how the tables are\nactually accessed.","publishedAt":"2026-11-30T13:36:03.148Z","updatedAt":"2026-11-30T13:36:03.148Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"e8521822c733c6deab0f339843cd37cd62c12795","status":"affected","lessThan":"af56f866f152afe843239818ed127994bb564eb2","versionType":"git"},{"version":"e8521822c733c6deab0f339843cd37cd62c12795","status":"affected","lessThan":"cf11ce423eb12ce5fb774101e7e49ec397ed732a","versionType":"git"},{"version":"e8521822c733c6deab0f339843cd37cd62c12795","status":"affected","lessThan":"2eca9c14e66a1f71c089fe5c3afb2d339da3023a","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/hw/ionic/ionic_ibdev.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.18","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/hw/ionic/ionic_ibdev.c"]}],"references":["https://git.kernel.org/stable/c/af56f866f152afe843239818ed127994bb564eb2","https://git.kernel.org/stable/c/cf11ce423eb12ce5fb774101e7e49ec397ed732a","https://git.kernel.org/stable/c/2eca9c14e66a1f71c089fe5c3afb2d339da3023a"],"weaknesses":[],"ingestedAt":"2026-11-30T13:52:04.503Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139578.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139578","state":"PUBLISHED","datePublished":"2026-11-30T13:36:03.148Z","dateUpdated":"2026-11-30T13:36:03.148Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.941Z"},"containers":{"cna":{"title":"RDMA/ionic: Fix XArray initialization to use XArray flags","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/ionic: Fix XArray initialization to use XArray flags\n\nxa_init_flags() takes XArray flags (XA_FLAGS_*), not gfp flags, even\nthough the parameter is typed gfp_t. Passing GFP_ATOMIC leaves both\nlock-type bits clear, so xa_lock_type() resolves to XA_LOCK_NORMAL for\nqp_tbl and cq_tbl.\n\nBoth tables are used with the IRQ-safe accessors: xa_store_irq() with\nGFP_KERNEL from process context, and xa_lock_irqsave() from the event\nqueue path. When a store needs to grow the tree, __xas_nomem() drops\nthe lock using the recorded lock type before allocating:\n\n\tif (gfpflags_allow_blocking(gfp)) {\n\t\txas_unlock_type(xas, lock_type);\n\t\txas->xa_alloc = kmem_cache_alloc_lru(...);\n\t\txas_lock_type(xas, lock_type);\n\t}\n\nWith XA_LOCK_NORMAL that is a plain spin_unlock(), so the sleeping\nGFP_KERNEL allocation runs with interrupts still disabled by\nxa_store_irq(), and lockdep annotates the lock with the wrong class.\n\nGFP_ATOMIC also happens to set __GFP_HIGH (0x20), which collides with\nXA_FLAGS_ACCOUNT (32U) and silently enables memcg accounting of the\nXArray nodes.\n\nUse XA_FLAGS_LOCK_IRQ so the lock type matches how the tables are\nactually accessed."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"e8521822c733c6deab0f339843cd37cd62c12795","status":"affected","lessThan":"af56f866f152afe843239818ed127994bb564eb2","versionType":"git"},{"version":"e8521822c733c6deab0f339843cd37cd62c12795","status":"affected","lessThan":"cf11ce423eb12ce5fb774101e7e49ec397ed732a","versionType":"git"},{"version":"e8521822c733c6deab0f339843cd37cd62c12795","status":"affected","lessThan":"2eca9c14e66a1f71c089fe5c3afb2d339da3023a","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/hw/ionic/ionic_ibdev.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.18","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/hw/ionic/ionic_ibdev.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/af56f866f152afe843239818ed127994bb564eb2"},{"url":"https://git.kernel.org/stable/c/cf11ce423eb12ce5fb774101e7e49ec397ed732a"},{"url":"https://git.kernel.org/stable/c/2eca9c14e66a1f71c089fe5c3afb2d339da3023a"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:36:03.148Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.18","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.18","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.18","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}