{"api_version":"1","generated_at":"2026-11-30T16:05:42+00:00","cve":"CVE-2026-139161","urls":{"html":"https://cve.report/CVE-2026-139161","api":"https://cve.report/api/cve/CVE-2026-139161.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-139161","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-139161"},"summary":{"title":"tls: keep TX and RX hardware offload on the same device","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ntls: keep TX and RX hardware offload on the same device\n\nAfter TX is offloaded on device A, a route change, or a change in the\nusable-slave set of an 802.3ad or balance-xor (layer3+4) bond, can make\nRX setup program device B. tls_device_attach() sees the existing TLS\ndestructor and keeps ctx->netdev pointing at A. The RX driver state on B\nis then untracked: tls_dev_resync() and tls_dev_del() are invoked on A\nfor a context it never created, and neither socket close nor\nNETDEV_DOWN on B calls tls_dev_del() for B, so the driver context leaks.\nThe reverse setup order has the same problem.\n\nCheck the shared device binding under device_offload_lock before each\ntls_dev_add(). Permit the first attachment and a second direction on the\nsame device. Reject a different device, including when the old binding\nwas cleared by NETDEV_DOWN: the TLS destructor remains installed and\ntls_device_attach() cannot establish a new binding. Setup then falls\nback to software for the requested direction.\n\nThe RX check precedes allocation and software setup. TX uses its existing\nresource unwind path without calling the driver. Document the shared\nbinding and clarify that fallback is per direction.\n\nThis issue was discovered during code review and subsequently\nreproduced on hardware using mlx5 and TLS 1.2 AES-GCM-128.\n\nChanging the route between TX and RX setup installed the second\ndirection on a different device. Driver traces showed successful adds\non both devices, but both deletes at socket close targeted the first\ndevice, leaving an orphaned context on the second. Both setup orders\nreproduced the leak, even though all current core TLS context counters\nreturned to zero. No crash was observed.\n\nWith the fix, the same tests correctly fall back to software for the\nsecond direction and leave no orphaned hardware context.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:18:34","updated_at":"2026-11-30 14:18:34"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/a2b9316a40f20a79e460bf31c4f036c17cc9c512","name":"https://git.kernel.org/stable/c/a2b9316a40f20a79e460bf31c4f036c17cc9c512","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/afd3039627d97a959214d544c660390cf28d6527","name":"https://git.kernel.org/stable/c/afd3039627d97a959214d544c660390cf28d6527","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/1c8a70075235cd733095532a97f2405037c52a7b","name":"https://git.kernel.org/stable/c/1c8a70075235cd733095532a97f2405037c52a7b","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/d1a31f1523543513da5b285d82598977303011c7","name":"https://git.kernel.org/stable/c/d1a31f1523543513da5b285d82598977303011c7","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-139161","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139161","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4799ac81e52a72a6404827bf2738337bb581a174 a2b9316a40f20a79e460bf31c4f036c17cc9c512 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4799ac81e52a72a6404827bf2738337bb581a174 afd3039627d97a959214d544c660390cf28d6527 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4799ac81e52a72a6404827bf2738337bb581a174 d1a31f1523543513da5b285d82598977303011c7 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4799ac81e52a72a6404827bf2738337bb581a174 1c8a70075235cd733095532a97f2405037c52a7b git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4.19","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 4.19 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.120 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.66 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.6 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["Documentation/networking/tls-offload.rst","net/tls/tls_device.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"a2b9316a40f20a79e460bf31c4f036c17cc9c512","status":"affected","version":"4799ac81e52a72a6404827bf2738337bb581a174","versionType":"git"},{"lessThan":"afd3039627d97a959214d544c660390cf28d6527","status":"affected","version":"4799ac81e52a72a6404827bf2738337bb581a174","versionType":"git"},{"lessThan":"d1a31f1523543513da5b285d82598977303011c7","status":"affected","version":"4799ac81e52a72a6404827bf2738337bb581a174","versionType":"git"},{"lessThan":"1c8a70075235cd733095532a97f2405037c52a7b","status":"affected","version":"4799ac81e52a72a6404827bf2738337bb581a174","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["Documentation/networking/tls-offload.rst","net/tls/tls_device.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"4.19"},{"lessThan":"4.19","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.120","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.66","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.6","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.120","versionStartIncluding":"4.19","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.66","versionStartIncluding":"4.19","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.6","versionStartIncluding":"4.19","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"4.19","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ntls: keep TX and RX hardware offload on the same device\n\nAfter TX is offloaded on device A, a route change, or a change in the\nusable-slave set of an 802.3ad or balance-xor (layer3+4) bond, can make\nRX setup program device B. tls_device_attach() sees the existing TLS\ndestructor and keeps ctx->netdev pointing at A. The RX driver state on B\nis then untracked: tls_dev_resync() and tls_dev_del() are invoked on A\nfor a context it never created, and neither socket close nor\nNETDEV_DOWN on B calls tls_dev_del() for B, so the driver context leaks.\nThe reverse setup order has the same problem.\n\nCheck the shared device binding under device_offload_lock before each\ntls_dev_add(). Permit the first attachment and a second direction on the\nsame device. Reject a different device, including when the old binding\nwas cleared by NETDEV_DOWN: the TLS destructor remains installed and\ntls_device_attach() cannot establish a new binding. Setup then falls\nback to software for the requested direction.\n\nThe RX check precedes allocation and software setup. TX uses its existing\nresource unwind path without calling the driver. Document the shared\nbinding and clarify that fallback is per direction.\n\nThis issue was discovered during code review and subsequently\nreproduced on hardware using mlx5 and TLS 1.2 AES-GCM-128.\n\nChanging the route between TX and RX setup installed the second\ndirection on a different device. Driver traces showed successful adds\non both devices, but both deletes at socket close targeted the first\ndevice, leaving an orphaned context on the second. Both setup orders\nreproduced the leak, even though all current core TLS context counters\nreturned to zero. No crash was observed.\n\nWith the fix, the same tests correctly fall back to software for the\nsecond direction and leave no orphaned hardware context."}],"providerMetadata":{"dateUpdated":"2026-11-30T13:32:08.809Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/a2b9316a40f20a79e460bf31c4f036c17cc9c512"},{"url":"https://git.kernel.org/stable/c/afd3039627d97a959214d544c660390cf28d6527"},{"url":"https://git.kernel.org/stable/c/d1a31f1523543513da5b285d82598977303011c7"},{"url":"https://git.kernel.org/stable/c/1c8a70075235cd733095532a97f2405037c52a7b"}],"title":"tls: keep TX and RX hardware offload on the same device","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-139161","datePublished":"2026-11-30T13:32:08.809Z","dateReserved":"2026-11-30T13:22:15.917Z","dateUpdated":"2026-11-30T13:32:08.809Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:18:34","lastModifiedDate":"2026-11-30 14:18:34","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"139161","Ordinal":"1","Title":"tls: keep TX and RX hardware offload on the same device","CVE":"CVE-2026-139161","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"139161","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\ntls: keep TX and RX hardware offload on the same device\n\nAfter TX is offloaded on device A, a route change, or a change in the\nusable-slave set of an 802.3ad or balance-xor (layer3+4) bond, can make\nRX setup program device B. tls_device_attach() sees the existing TLS\ndestructor and keeps ctx->netdev pointing at A. The RX driver state on B\nis then untracked: tls_dev_resync() and tls_dev_del() are invoked on A\nfor a context it never created, and neither socket close nor\nNETDEV_DOWN on B calls tls_dev_del() for B, so the driver context leaks.\nThe reverse setup order has the same problem.\n\nCheck the shared device binding under device_offload_lock before each\ntls_dev_add(). Permit the first attachment and a second direction on the\nsame device. Reject a different device, including when the old binding\nwas cleared by NETDEV_DOWN: the TLS destructor remains installed and\ntls_device_attach() cannot establish a new binding. Setup then falls\nback to software for the requested direction.\n\nThe RX check precedes allocation and software setup. TX uses its existing\nresource unwind path without calling the driver. Document the shared\nbinding and clarify that fallback is per direction.\n\nThis issue was discovered during code review and subsequently\nreproduced on hardware using mlx5 and TLS 1.2 AES-GCM-128.\n\nChanging the route between TX and RX setup installed the second\ndirection on a different device. Driver traces showed successful adds\non both devices, but both deletes at socket close targeted the first\ndevice, leaving an orphaned context on the second. Both setup orders\nreproduced the leak, even though all current core TLS context counters\nreturned to zero. No crash was observed.\n\nWith the fix, the same tests correctly fall back to software for the\nsecond direction and leave no orphaned hardware context.","Type":"Description","Title":"tls: keep TX and RX hardware offload on the same device"}]}}}