{"id":"CVE-2026-74386","state":"PUBLISHED","title":"nvmet-tcp: fix page fragment cache leak in error path","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvmet-tcp: fix page fragment cache leak in error path\n\nIn nvmet_tcp_alloc_queue(), when a connection is closed during the\nallocation process (e.g., nvmet_tcp_set_queue_sock() returns -ENOTCONN),\nthe error handling jumps to out_destroy_sq and then to out_ida_remove\nwithout draining the page fragment cache.\n\nAlthough nvmet_tcp_free_cmd() is called in some error paths to release\nindividual page fragments, the underlying page cache reference held by\nqueue->pf_cache is never released. The first allocation using pf_cache\nis the call to nvmet_tcp_alloc_cmd() for queue->connect, which happens\nafter ida_alloc() returns successfully. This results in a page leak each\ntime a connection fails during allocation, which could lead to memory\nexhaustion over time if connections are repeatedly opened and closed.\n\nFix this by calling page_frag_cache_drain() before freeing the queue\nstructure in the out_ida_remove label.","publishedAt":"2026-08-15T05:59:01.786Z","updatedAt":"2026-10-30T12:29:52.129Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"872d26a391da92ed8f0c0f5cb5fef428067b7f30","status":"affected","lessThan":"aadb8eb9006e192c51b499860f40765de7d55680","versionType":"git"},{"version":"872d26a391da92ed8f0c0f5cb5fef428067b7f30","status":"affected","lessThan":"fc11e3f0daaadb6e600a86e54b089d4662d0a464","versionType":"git"},{"version":"872d26a391da92ed8f0c0f5cb5fef428067b7f30","status":"affected","lessThan":"a43a9abc1ebf663f0aa56a729106f68dd9c77da6","versionType":"git"},{"version":"872d26a391da92ed8f0c0f5cb5fef428067b7f30","status":"affected","lessThan":"ba3209704b3cd46961e4e081af5c52a780785648","versionType":"git"},{"version":"872d26a391da92ed8f0c0f5cb5fef428067b7f30","status":"affected","lessThan":"5fbe83a374f09561a0f0c1f4aa021501ffd681eb","versionType":"git"},{"version":"872d26a391da92ed8f0c0f5cb5fef428067b7f30","status":"affected","lessThan":"4dae393956093c807212918fd91a8fc70df15338","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvme/target/tcp.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.0","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.0","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.160","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.97","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.40","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.5","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvme/target/tcp.c"]}],"references":["https://git.kernel.org/stable/c/aadb8eb9006e192c51b499860f40765de7d55680","https://git.kernel.org/stable/c/fc11e3f0daaadb6e600a86e54b089d4662d0a464","https://git.kernel.org/stable/c/a43a9abc1ebf663f0aa56a729106f68dd9c77da6","https://git.kernel.org/stable/c/ba3209704b3cd46961e4e081af5c52a780785648","https://git.kernel.org/stable/c/5fbe83a374f09561a0f0c1f4aa021501ffd681eb","https://git.kernel.org/stable/c/4dae393956093c807212918fd91a8fc70df15338"],"weaknesses":[],"ingestedAt":"2026-10-30T12:48:04.825Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/74xxx/CVE-2026-74386.json","commit":"1f312381e38164a43607eebab851b151dd16861e","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-74386","state":"PUBLISHED","datePublished":"2026-08-15T05:59:01.786Z","dateUpdated":"2026-10-30T12:29:52.129Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-08-15T05:44:03.890Z"},"containers":{"cna":{"title":"nvmet-tcp: fix page fragment cache leak in error path","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvmet-tcp: fix page fragment cache leak in error path\n\nIn nvmet_tcp_alloc_queue(), when a connection is closed during the\nallocation process (e.g., nvmet_tcp_set_queue_sock() returns -ENOTCONN),\nthe error handling jumps to out_destroy_sq and then to out_ida_remove\nwithout draining the page fragment cache.\n\nAlthough nvmet_tcp_free_cmd() is called in some error paths to release\nindividual page fragments, the underlying page cache reference held by\nqueue->pf_cache is never released. The first allocation using pf_cache\nis the call to nvmet_tcp_alloc_cmd() for queue->connect, which happens\nafter ida_alloc() returns successfully. This results in a page leak each\ntime a connection fails during allocation, which could lead to memory\nexhaustion over time if connections are repeatedly opened and closed.\n\nFix this by calling page_frag_cache_drain() before freeing the queue\nstructure in the out_ida_remove label."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"872d26a391da92ed8f0c0f5cb5fef428067b7f30","status":"affected","lessThan":"aadb8eb9006e192c51b499860f40765de7d55680","versionType":"git"},{"version":"872d26a391da92ed8f0c0f5cb5fef428067b7f30","status":"affected","lessThan":"fc11e3f0daaadb6e600a86e54b089d4662d0a464","versionType":"git"},{"version":"872d26a391da92ed8f0c0f5cb5fef428067b7f30","status":"affected","lessThan":"a43a9abc1ebf663f0aa56a729106f68dd9c77da6","versionType":"git"},{"version":"872d26a391da92ed8f0c0f5cb5fef428067b7f30","status":"affected","lessThan":"ba3209704b3cd46961e4e081af5c52a780785648","versionType":"git"},{"version":"872d26a391da92ed8f0c0f5cb5fef428067b7f30","status":"affected","lessThan":"5fbe83a374f09561a0f0c1f4aa021501ffd681eb","versionType":"git"},{"version":"872d26a391da92ed8f0c0f5cb5fef428067b7f30","status":"affected","lessThan":"4dae393956093c807212918fd91a8fc70df15338","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvme/target/tcp.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.0","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.0","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.160","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.97","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.40","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.5","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvme/target/tcp.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/aadb8eb9006e192c51b499860f40765de7d55680"},{"url":"https://git.kernel.org/stable/c/fc11e3f0daaadb6e600a86e54b089d4662d0a464"},{"url":"https://git.kernel.org/stable/c/a43a9abc1ebf663f0aa56a729106f68dd9c77da6"},{"url":"https://git.kernel.org/stable/c/ba3209704b3cd46961e4e081af5c52a780785648"},{"url":"https://git.kernel.org/stable/c/5fbe83a374f09561a0f0c1f4aa021501ffd681eb"},{"url":"https://git.kernel.org/stable/c/4dae393956093c807212918fd91a8fc70df15338"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-30T12:29:52.129Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"6.1.191"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"6.6.160"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"6.12.97"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"6.18.40"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"7.1.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"7.2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}