Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3517135BDDB for ; Sun, 18 Oct 2026 15:51:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792338665; cv=none; b=sGYL33WGMAnbdXqloDtWqxJpJIMUNfkID9KHe4S/69XqbXsP9JEMK8muHK27tJyrtnGMAcsvBCCk9q3GqHvfU+ObfvGtfJCq5SzNnbf7NGUsQ/e4o6XlzxVFCr9YkEUuReAlCpNUodtIStSznFjUqfivco+O47me8numGmADn2Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792338665; c=relaxed/simple; bh=a2VIHvAlCWS3Il3+VoLthj9i4IqSU4b076TK6a1pNoA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EynsaaflBO6inqloEf33bQ96D1wmalShUzNT9aGD9OMinH2GRdAd55TzYypUGhOPJQfa+sP1ctzxFfZiHptIAyUUUrz5tU0Zuvkhfi5AXLRbPKFxKDwQ0ybUKw0OS2MG4XOqfgZEM2Cf54yT4zu9Uy73sPnIkVbRfLUcel9n10c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=WBg60TZi; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="WBg60TZi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7FBFC1F000C4; Sun, 18 Oct 2026 15:50:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1792338663; bh=20cwvds8sSdwHD7yfyYSpkRLfC+odRnsY+09HjxSydQ=; h=From:To:Cc:Subject:Date:Reply-To; b=WBg60TZiBJCJGCCHMr42U2LXpHBkVojB+yAObbo+4lqEfLc7YXfQIZnCnOt1W+K8W fCuRveFaz4/xzV9aMiADY7gmrr/hKpezuYwRwAaskEz32WRoeCEaX9apb04sthyARM R6Zco3VWv4/LFUDtg+W89uBNVp4vHAlbKtFsy8yI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-98694: thunderbolt: Fix KASAN reported use-after-free when request is canceled Date: Sun, 18 Oct 2026 17:44:29 +0200 Message-ID: <2026101803-CVE-2026-98694-2ea9@gregkh> X-Mailer: git-send-email 2.56.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=5778; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=nUg+NluvVW0ryA2a+FpcUHTxN7IcByOgCX/reDy9a+w=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlXXrrIe3crC4l9fPnnnPLrbevmxb0IW3J7XZXsUiGfC 6dPqf/50RHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATiSlnWHDmhFxep9ehhfkf f5vNEOqKe2MiNo9hntFfpxsBOpsrQo9yeZ9y8jCTsDy9BQA= 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: thunderbolt: Fix KASAN reported use-after-free when request is canceled Alan reported that when doing stress testing sometimes KASAN notices use-after-free during control channel operation (stripped down keeping the relevant parts): BUG: KASAN: slab-use-after-free in tb_cfg_request_sync+0x240/0x250 [thunderbolt] Read of size 24 at addr ffff88811067f290 by task kworker/u40:2/1760 tb_cfg_request_sync+0x240/0x250 [thunderbolt] tb_cfg_read_raw+0x367/0x510 [thunderbolt] tb_cfg_read+0xec/0x240 [thunderbolt] tb_port_get_link_generation+0x258/0x420 [thunderbolt] tb_usb3_consumed_bandwidth+0x1c1/0x2c0 [thunderbolt] tb_tunnel_consumed_bandwidth+0xfd/0x910 [thunderbolt] tb_available_bandwidth+0x5f2/0xeb0 [thunderbolt] tb_recalc_estimated_bandwidth+0x2a0/0x1bc0 [thunderbolt] tb_handle_dp_bandwidth_request+0x1897/0x5e20 [thunderbolt] process_one_work+0x675/0x1230 worker_thread+0x5e6/0xf70 kthread+0x365/0x470 ret_from_fork+0x54d/0x710 ret_from_fork_asm+0x1a/0x30 Allocated by task 1760: __kmalloc_cache_noprof+0x1ee/0x550 tb_cfg_read_raw+0x1d3/0x510 [thunderbolt] tb_cfg_read+0xec/0x240 [thunderbolt] tb_port_get_link_generation+0x258/0x420 [thunderbolt] tb_usb3_consumed_bandwidth+0x1c1/0x2c0 [thunderbolt] tb_tunnel_consumed_bandwidth+0xfd/0x910 [thunderbolt] tb_available_bandwidth+0x5f2/0xeb0 [thunderbolt] tb_recalc_estimated_bandwidth+0x2a0/0x1bc0 [thunderbolt] tb_handle_dp_bandwidth_request+0x1897/0x5e20 [thunderbolt] process_one_work+0x675/0x1230 worker_thread+0x5e6/0xf70 kthread+0x365/0x470 ret_from_fork+0x54d/0x710 ret_from_fork_asm+0x1a/0x30 Freed by task 926: kfree+0x18f/0x4a0 tb_cfg_request_put+0xb7/0xe0 [thunderbolt] tb_cfg_request_work+0x82/0x120 [thunderbolt] process_one_work+0x675/0x1230 worker_thread+0x5e6/0xf70 kthread+0x365/0x470 ret_from_fork+0x54d/0x710 ret_from_fork_asm+0x1a/0x30 Second to last potentially related work creation: __queue_work+0x575/0xd00 queue_work_on+0x77/0x80 tb_cfg_request_cancel+0xc7/0x260 [thunderbolt] tb_cfg_request_sync+0x1f6/0x250 [thunderbolt] tb_cfg_read_raw+0x367/0x510 [thunderbolt] tb_cfg_read+0xec/0x240 [thunderbolt] tb_port_get_link_generation+0x258/0x420 [thunderbolt] tb_usb3_consumed_bandwidth+0x1c1/0x2c0 [thunderbolt] tb_tunnel_consumed_bandwidth+0xfd/0x910 [thunderbolt] tb_available_bandwidth+0x5f2/0xeb0 [thunderbolt] tb_recalc_estimated_bandwidth+0x2a0/0x1bc0 [thunderbolt] tb_handle_dp_bandwidth_request+0x1897/0x5e20 [thunderbolt] process_one_work+0x675/0x1230 worker_thread+0x5e6/0xf70 kthread+0x365/0x470 ret_from_fork+0x54d/0x710 ret_from_fork_asm+0x1a/0x30 The last stack trace is helpful because it shows that we are cancelling a request and looking at tb_cfg_request_cancel() what might happen is that tb_cfg_request_work() completes right before tb_cfg_request_cancel() starts and because of this it will call schedule_work() queueing the same work to run again. However, it is already removed from the request_queue and reference count is dropped so when tb_cfg_request_work() triggers again it will access memory that is already released. Fix this so that we first make sure a cancelled request is not handed away from tb_cfg_request_find() or scheduled to run. Then instead of relying on the worker to clean up the request we will do it in tb_cfg_request_cancel() after the work is canceled from running. Make tb_cfg_request_dequeue() release the request only if it was actually removed from the queue. The Linux kernel CVE team has assigned CVE-2026-98694 to this issue. Affected and fixed versions =========================== Issue introduced in 4.13 with commit d7f781bfdbf4eb7c5706c9974b8bf6d3c82e69c1 and fixed in 6.12.113 with commit 71b3c517e02af2c46ad58d4b3706b7c3cb24936d Issue introduced in 4.13 with commit d7f781bfdbf4eb7c5706c9974b8bf6d3c82e69c1 and fixed in 6.18.56 with commit f18faa3d3b810d60a3005ae1b1d1866faa67d343 Issue introduced in 4.13 with commit d7f781bfdbf4eb7c5706c9974b8bf6d3c82e69c1 and fixed in 7.2.10 with commit 08287212b622039212c972806f896f078dfd28e2 Issue introduced in 4.13 with commit d7f781bfdbf4eb7c5706c9974b8bf6d3c82e69c1 and fixed in 7.3-rc6 with commit a02188ddc24b7872f0c5e0c5873f827318717803 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-98694 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/thunderbolt/ctl.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/71b3c517e02af2c46ad58d4b3706b7c3cb24936d https://git.kernel.org/stable/c/f18faa3d3b810d60a3005ae1b1d1866faa67d343 https://git.kernel.org/stable/c/08287212b622039212c972806f896f078dfd28e2 https://git.kernel.org/stable/c/a02188ddc24b7872f0c5e0c5873f827318717803