{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139159","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-11-30T13:22:15.917Z","datePublished":"2026-11-30T13:32:07.724Z","dateUpdated":"2026-12-01T05:41:39.864Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-12-01T05:41:39.864Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvmet: prevent double-free after metadata SGL allocation failure\n\nIf metadata SGL allocation fails, nvmet_req_alloc_sgls() frees\nreq->sg without clearing it. The RDMA error completion path later\nfrees the same scatterlist again.\n\nUse nvmet_req_free_sgls() instead so that the scatterlist pointers\nand counts are cleared before response cleanup."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":8.1,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:N - nvmet_req_alloc_sgls() is called only from nvmet_rdma_map_sgl_keyed(), reached from nvmet_rdma_handle_command() for an NVMe Read/Write capsule received over RDMA. The remote host's command sets the data length (keyed SGL) and the metadata length (rw.length × PI size). PI needs mlx5 integrity handover, which runs over routable RoCEv2.\nAC:H - The bug needs the metadata sgl_alloc(GFP_KERNEL) of at most 512KB to fail after the data one succeeded. Order-0 pages and a kmalloc of 8KB or less from a kworker OOM-kill rather than fail, so the host cannot force it. It also needs ctrl->pi_support (port param_pi_enable and subsys attr_pi_enable, both off by default) and an 8-byte PI bdev.\nPR:N - Before the I/O queue accepts commands, the host only has to pass nvmet_host_allowed() in Connect. That checks allow_any_host or a hostnqn string the host asserts itself, with no authentication unless DH-HMAC-CHAP is configured. This matches the existing nvmet-rdma PI record.\nUI:N - The remote host sends the Read/Write capsules itself. No action is needed from anyone on the target.\nS:U - The double free corrupts the target kernel's own page and slab state. No other security authority is crossed.\nC:H - Between the two frees, the freed data pages and the kmalloc_large scatterlist array page can be reused by the host's next Write buffers. The second sgl_free() then reads host-written bytes as scatterlist entries and frees arbitrary pages, which gives a page use-after-free that can be turned into a read primitive.\nI:H - nvmet_req_free_sgls() calls __free_pages() on every page in the stale req->sg, then kfree() on the array. Once the host has refilled that memory, it frees live pages or pages the host chose. This is a double free that enables arbitrary write.\nA:H - Freeing the same pages and scatterlist array twice through sgl_free() causes bad page state, slab freelist corruption or a KASAN double-free oops on the target."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvme/target/core.c"],"versions":[{"version":"c6e3f13398123a008cd2ee28f93510b113a32791","lessThan":"b22d6aa4c956240d6c9a27b743df8548ecd6c3dd","status":"affected","versionType":"git"},{"version":"c6e3f13398123a008cd2ee28f93510b113a32791","lessThan":"2e8c8c6ff43ca4cf52c82470e72bd73ddd660b87","status":"affected","versionType":"git"},{"version":"c6e3f13398123a008cd2ee28f93510b113a32791","lessThan":"bb5dd42918c62988c734b0017e41c11043c2946c","status":"affected","versionType":"git"},{"version":"c6e3f13398123a008cd2ee28f93510b113a32791","lessThan":"c07e6802f75e112e82cfacbe01a15fb047ef7284","status":"affected","versionType":"git"},{"version":"c6e3f13398123a008cd2ee28f93510b113a32791","lessThan":"d998fa25c4f8d81541f1ae52d39dde9dd343df9b","status":"affected","versionType":"git"},{"version":"c6e3f13398123a008cd2ee28f93510b113a32791","lessThan":"caaf795ed9946074a8f9154e67053f4cc9cde7e0","status":"affected","versionType":"git"},{"version":"c6e3f13398123a008cd2ee28f93510b113a32791","lessThan":"5f981beb9a8d050a7cabd7184cf4c96643eff9a7","status":"affected","versionType":"git"},{"version":"c6e3f13398123a008cd2ee28f93510b113a32791","lessThan":"2f61b9d1d54edf75a352c43eebe3804144b5d44e","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvme/target/core.c"],"versions":[{"version":"5.8","status":"affected"},{"version":"0","lessThan":"5.8","status":"unaffected","versionType":"semver"},{"version":"5.10.275","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.226","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.193","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.163","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.119","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.18.65","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"7.3.6","lessThanOrEqual":"7.3.*","status":"unaffected","versionType":"semver"},{"version":"7.4-rc1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"5.10.275"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"5.15.226"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.1.193"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.6.163"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.12.119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"7.4-rc1"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/b22d6aa4c956240d6c9a27b743df8548ecd6c3dd"},{"url":"https://git.kernel.org/stable/c/2e8c8c6ff43ca4cf52c82470e72bd73ddd660b87"},{"url":"https://git.kernel.org/stable/c/bb5dd42918c62988c734b0017e41c11043c2946c"},{"url":"https://git.kernel.org/stable/c/c07e6802f75e112e82cfacbe01a15fb047ef7284"},{"url":"https://git.kernel.org/stable/c/d998fa25c4f8d81541f1ae52d39dde9dd343df9b"},{"url":"https://git.kernel.org/stable/c/caaf795ed9946074a8f9154e67053f4cc9cde7e0"},{"url":"https://git.kernel.org/stable/c/5f981beb9a8d050a7cabd7184cf4c96643eff9a7"},{"url":"https://git.kernel.org/stable/c/2f61b9d1d54edf75a352c43eebe3804144b5d44e"}],"title":"nvmet: prevent double-free after metadata SGL allocation failure","x_generator":{"engine":"bippy-1.2.0"}}}}