Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 947B31DDC3D for ; Tue, 5 Nov 2024 17:12:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730826732; cv=none; b=sD0IMuS61w3huzrij5wG8i24Mzuov4lDrCOGzfTd924+CkQjQZL3179Mxbc3nBUWa2gQ9Q3GMyeQLFGF174IbZhOe+CXIGiVUYgSJl81J8Yuqh43jtBQVKIWeAShqdcUaQe0vlh6TfkjTChqoD6CTyv5Yh4Xj3bPxdQ7ccEDzss= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730826732; c=relaxed/simple; bh=gcnyGhcO/nYuVzLIC9u/T8SCuJqPt0AWG5dbnzw27y0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gUyjOI5X7Wk+W8Sedw9RXJhYXtRgrwPpuyZtC+hWoy77mBJ6pHx8MEgiOGmeeNBmBzaVegmwHS8wtXRBlnQi6L4NgjRIM5vLL+EE2+x492vi+oM04xDrtztSsNAcX/LCA9r6hYjPmVMQ/j7r2r9eZaeZea9A6cvEgy77ZFrKvYs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=eAUtfG+l; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="eAUtfG+l" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4B71C4CECF; Tue, 5 Nov 2024 17:12:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1730826732; bh=gcnyGhcO/nYuVzLIC9u/T8SCuJqPt0AWG5dbnzw27y0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=eAUtfG+lOaL7mEMnKebKEhig7pTzhjYXuSJ5+WmbF6D2CBJ1vGbxEvbS+okr5XOq4 lZVoxHm9jayuDNX4PQqMnYjpqnjY1+N/y9SO4NGBqfKySzq+aiYJbxV/yENCM+DdGr nRPTlStF70YPctWIFx0AeVQEeDz5KeKxoSpvMuQQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50126: net: sched: use RCU read-side critical section in taprio_dump() Date: Tue, 5 Nov 2024 18:11:15 +0100 Message-ID: <2024110557-CVE-2024-50126-733b@gregkh> X-Mailer: git-send-email 2.47.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=4814; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=gcnyGhcO/nYuVzLIC9u/T8SCuJqPt0AWG5dbnzw27y0=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlagQu5Ji/bU7TQo8m6Y9WSRUukluus0FltKnBQqn+pE jd7SKtXRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzEvoRhfsiTZYG/d/Y9V6rr 7n1nIOzYvP04I8OCE60np9wWtI29FH//cdvf3NN3HN4oAwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: net: sched: use RCU read-side critical section in taprio_dump() Fix possible use-after-free in 'taprio_dump()' by adding RCU read-side critical section there. Never seen on x86 but found on a KASAN-enabled arm64 system when investigating https://syzkaller.appspot.com/bug?extid=b65e0af58423fc8a73aa: [T15862] BUG: KASAN: slab-use-after-free in taprio_dump+0xa0c/0xbb0 [T15862] Read of size 4 at addr ffff0000d4bb88f8 by task repro/15862 [T15862] [T15862] CPU: 0 UID: 0 PID: 15862 Comm: repro Not tainted 6.11.0-rc1-00293-gdefaf1a2113a-dirty #2 [T15862] Hardware name: QEMU QEMU Virtual Machine, BIOS edk2-20240524-5.fc40 05/24/2024 [T15862] Call trace: [T15862] dump_backtrace+0x20c/0x220 [T15862] show_stack+0x2c/0x40 [T15862] dump_stack_lvl+0xf8/0x174 [T15862] print_report+0x170/0x4d8 [T15862] kasan_report+0xb8/0x1d4 [T15862] __asan_report_load4_noabort+0x20/0x2c [T15862] taprio_dump+0xa0c/0xbb0 [T15862] tc_fill_qdisc+0x540/0x1020 [T15862] qdisc_notify.isra.0+0x330/0x3a0 [T15862] tc_modify_qdisc+0x7b8/0x1838 [T15862] rtnetlink_rcv_msg+0x3c8/0xc20 [T15862] netlink_rcv_skb+0x1f8/0x3d4 [T15862] rtnetlink_rcv+0x28/0x40 [T15862] netlink_unicast+0x51c/0x790 [T15862] netlink_sendmsg+0x79c/0xc20 [T15862] __sock_sendmsg+0xe0/0x1a0 [T15862] ____sys_sendmsg+0x6c0/0x840 [T15862] ___sys_sendmsg+0x1ac/0x1f0 [T15862] __sys_sendmsg+0x110/0x1d0 [T15862] __arm64_sys_sendmsg+0x74/0xb0 [T15862] invoke_syscall+0x88/0x2e0 [T15862] el0_svc_common.constprop.0+0xe4/0x2a0 [T15862] do_el0_svc+0x44/0x60 [T15862] el0_svc+0x50/0x184 [T15862] el0t_64_sync_handler+0x120/0x12c [T15862] el0t_64_sync+0x190/0x194 [T15862] [T15862] Allocated by task 15857: [T15862] kasan_save_stack+0x3c/0x70 [T15862] kasan_save_track+0x20/0x3c [T15862] kasan_save_alloc_info+0x40/0x60 [T15862] __kasan_kmalloc+0xd4/0xe0 [T15862] __kmalloc_cache_noprof+0x194/0x334 [T15862] taprio_change+0x45c/0x2fe0 [T15862] tc_modify_qdisc+0x6a8/0x1838 [T15862] rtnetlink_rcv_msg+0x3c8/0xc20 [T15862] netlink_rcv_skb+0x1f8/0x3d4 [T15862] rtnetlink_rcv+0x28/0x40 [T15862] netlink_unicast+0x51c/0x790 [T15862] netlink_sendmsg+0x79c/0xc20 [T15862] __sock_sendmsg+0xe0/0x1a0 [T15862] ____sys_sendmsg+0x6c0/0x840 [T15862] ___sys_sendmsg+0x1ac/0x1f0 [T15862] __sys_sendmsg+0x110/0x1d0 [T15862] __arm64_sys_sendmsg+0x74/0xb0 [T15862] invoke_syscall+0x88/0x2e0 [T15862] el0_svc_common.constprop.0+0xe4/0x2a0 [T15862] do_el0_svc+0x44/0x60 [T15862] el0_svc+0x50/0x184 [T15862] el0t_64_sync_handler+0x120/0x12c [T15862] el0t_64_sync+0x190/0x194 [T15862] [T15862] Freed by task 6192: [T15862] kasan_save_stack+0x3c/0x70 [T15862] kasan_save_track+0x20/0x3c [T15862] kasan_save_free_info+0x4c/0x80 [T15862] poison_slab_object+0x110/0x160 [T15862] __kasan_slab_free+0x3c/0x74 [T15862] kfree+0x134/0x3c0 [T15862] taprio_free_sched_cb+0x18c/0x220 [T15862] rcu_core+0x920/0x1b7c [T15862] rcu_core_si+0x10/0x1c [T15862] handle_softirqs+0x2e8/0xd64 [T15862] __do_softirq+0x14/0x20 The Linux kernel CVE team has assigned CVE-2024-50126 to this issue. Affected and fixed versions =========================== Issue introduced in 6.1 with commit 18cdd2f0998a and fixed in 6.6.59 with commit 5d282467245f Issue introduced in 6.1 with commit 18cdd2f0998a and fixed in 6.11.6 with commit e4369cb6acf6 Issue introduced in 6.1 with commit 18cdd2f0998a and fixed in 6.12-rc5 with commit b22db8b8befe 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-2024-50126 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: net/sched/sch_taprio.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/5d282467245f267c0b9ada3f7f309ff838521536 https://git.kernel.org/stable/c/e4369cb6acf6b895ac2453cc1cdf2f4326122c6d https://git.kernel.org/stable/c/b22db8b8befe90b61c98626ca1a2fbb0505e9fe3