From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796047158; b=BnatGqQeCQi8XkIUWnHYGuNYbOpHSKQtLKRMkd4sti2FyRC2GKxCYhqooLW2Gtnqk4v5 yGo+F1x36TTrze+op9uesNpdgXBPHAme7vQcBlIpgI4F6XTlkj8tF9/UZfJIEV9N6sHVS +jxV7+XU+4YuGkt48mxuuWHgOTVn5l5YSu1Z4zcJXZHcbf3mAlLrBKiEY818IuSwJfAp/ 5oKxEJ+1nEjkNG2/0RBQZgLP0fYfPvQXHSDf3vdB5xC2C0OIYw7ia3mUz6lALn07DNK+o UF7lArfzYQQXcCC/CQ6cGYgmxzwVoW7By6epS2YXt01vEkjND946495SuXG0A3pMO+A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796047158; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=OhAE9B8oXfRPy5I4MPTbvh9Qv6hUItw01mjTsAsRE2M=; b=kqBNEoOCQzdFP4P3Ht24zihBo7xylUZ+VH3py8B9imCTy3ZS1I+BofxrtZ+dc8yXlzLs BVjpVVGFHTwVHwlM2HhGHqZJxyeGp70yuMNL5n7acl1ILgA2ZGbj9skag08NKPiw6aLYV 6sKnCIqRtBIGfB0pvJDHb7Y6UL8sS6CUAeRs2hGm5byxRhqRo3n09nCexhc3lbFlojW9I YdLQPCuIJMkdHpiDHCQzMtaIsvSIjs+HlZvDlsYxruqnO3RcZ+uB066TJgT/SVbP2E4vk ndo0rF7wAJJEKdqX5DhJ8yzxiQ26GaEDIjFwI9Lw+TOjZ+hLf8AFEFTcmAH8Z6Qbf1w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=oaqfKIWj; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 516BA606A681 for ; Mon, 30 Nov 2026 13:59:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=oaqfKIWj Received: by smtp.kernel.org (Postfix) with ESMTPSA id CF5891F02812; Mon, 30 Nov 2026 13:59:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796047158; bh=OhAE9B8oXfRPy5I4MPTbvh9Qv6hUItw01mjTsAsRE2M=; h=From:To:Cc:Subject:Date:Reply-To; b=oaqfKIWjqQefby532/Mu4AVr00xRKuLpmeiEnM2wZU+iRocrkLr4fdVaLkdhOs/Bc QmgAsOtT0LHxJDjrdLBkgRWOAr9YRmSYhkmsh5vrH08S29PzR0TA77CnWbGcJS4kwh glvS1RjPNNUqD72EKtCt0IShCtCrsPBmBibaave8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-139182: net: tun: hold napi_mutex when deleting NAPI in tun_detach_all() Date: Mon, 30 Nov 2026 14:33:11 +0100 Message-ID: <2026113048-CVE-2026-139182-8430@gregkh> X-Mailer: git-send-email 2.56.1 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4412; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=5u3HRtAbyioQyIlhP9Y2jZPQd41v0gujpeC2PJ/ZGew=; b=owGbwMvMwCRo6H6F97bub03G02pJDNm8VUcYT6maMv29svn2v+wWnXqGEsbuxVpO7zKdbdVyD /4QXZjbEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABO5KciwYOFt2dufbhjnhSst eTfljLpMwe2bbAzzq3kDz4pyH94lO0Nw9cykdZp/tOTiAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: net: tun: hold napi_mutex when deleting NAPI in tun_detach_all() With IFF_NAPI_FRAGS, tun_get_user() takes tfile->napi_mutex, gets the skb from napi_get_frags() and copies the user data into it before it enters the RCU read-side section around napi_gro_frags(). tun_detach_all() waits with synchronize_net() and then calls tun_napi_del() without napi_mutex. netif_napi_del() frees napi->skb through napi_free_frags(). A writer that is still copying has not yet entered its RCU section, so synchronize_net() does not wait for it, and deleting the device frees the skb while the writer is using it: BUG: KASAN: slab-use-after-free in skb_copy_datagram_from_iter+0x175/0x720 Read of size 8 at addr ffff888077def990 by task br029-poc/9406 Call Trace: skb_copy_datagram_from_iter+0x175/0x720 tun_get_user+0xb42/0x3d00 tun_chr_write_iter+0x113/0x200 ... Freed by task 9405: kmem_cache_free+0x184/0x670 __netif_napi_del_locked+0x2bb/0x3c0 tun_net_uninit+0x566/0xa70 unregister_netdevice_many_notify+0x1a26/0x2090 rtnl_dellink+0x514/0x710 __tun_detach() also calls tun_napi_del() without the mutex, but only from tun_chr_close(), when no write on that file can be in flight. Take napi_mutex around tun_napi_del() in tun_detach_all() for both attached and disabled queues. The Linux kernel CVE team has assigned CVE-2026-139182 to this issue. Affected and fixed versions =========================== Issue introduced in 4.15 with commit 90e33d45940793def6f773b2d528e9f3c84ffdc7 and fixed in 5.10.275 with commit 55a9754198e1171c5797b31fe60517d58219294c Issue introduced in 4.15 with commit 90e33d45940793def6f773b2d528e9f3c84ffdc7 and fixed in 5.15.226 with commit 50ee89b116c96f7d285633a082bc0a703bda9c7e Issue introduced in 4.15 with commit 90e33d45940793def6f773b2d528e9f3c84ffdc7 and fixed in 6.1.193 with commit 52d9eeb9e183b8d9094afd540f360e70cea8142d Issue introduced in 4.15 with commit 90e33d45940793def6f773b2d528e9f3c84ffdc7 and fixed in 6.6.163 with commit e3c95c73023c2ffd43b8495df9299fe03f03148f Issue introduced in 4.15 with commit 90e33d45940793def6f773b2d528e9f3c84ffdc7 and fixed in 6.12.119 with commit b4ba1f5d3e954b62c295529436e2a6883d875027 Issue introduced in 4.15 with commit 90e33d45940793def6f773b2d528e9f3c84ffdc7 and fixed in 6.18.65 with commit ea600cb5ebe44e48ddc2b0af206e0d1d32ada839 Issue introduced in 4.15 with commit 90e33d45940793def6f773b2d528e9f3c84ffdc7 and fixed in 7.3.6 with commit f5fbedfb039cc124bfeded1afd8e58ac76b2d55d Issue introduced in 4.15 with commit 90e33d45940793def6f773b2d528e9f3c84ffdc7 and fixed in 7.4-rc1 with commit 6c799b4998c87bb44574bb090b8728bb3b3dbc47 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-139182 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/net/tun.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/55a9754198e1171c5797b31fe60517d58219294c https://git.kernel.org/stable/c/50ee89b116c96f7d285633a082bc0a703bda9c7e https://git.kernel.org/stable/c/52d9eeb9e183b8d9094afd540f360e70cea8142d https://git.kernel.org/stable/c/e3c95c73023c2ffd43b8495df9299fe03f03148f https://git.kernel.org/stable/c/b4ba1f5d3e954b62c295529436e2a6883d875027 https://git.kernel.org/stable/c/ea600cb5ebe44e48ddc2b0af206e0d1d32ada839 https://git.kernel.org/stable/c/f5fbedfb039cc124bfeded1afd8e58ac76b2d55d https://git.kernel.org/stable/c/6c799b4998c87bb44574bb090b8728bb3b3dbc47