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 277441DD873 for ; Fri, 27 Dec 2024 15:07: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=1735312032; cv=none; b=aBIKPot/6i/Drc4BAckWYKJI3NCVZaBCfEm28mmSgvma9Itcal9oTbx5YNj/5zZBzMsKXqn8DucmMv43QozNpJ1ONnmI9S5afajqtU8q9dLG9KOb2oH1BQMixtTdA0a6vyi3QP4ZdAP5DSsPaDJT3VUItKCLgY1euHuQ6t26C1w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735312032; c=relaxed/simple; bh=AUkGyAMnyo3UVOU6MFcMgMJOFsCnXRbhs34OxbmhPw8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=o4JpJ8ASzecLpellbYCHqAtiFKRzKg4B2UFLV+L9IgYhunIPpROHQavtMf86gNNxoXk0e8cHsvyx6BKB0Rn2NxB2CF+tX3m/GT9gFLU5zjXdZtZ8G3jE9fgpUgxbgoAEgXSbOWQoWKcn7CMGxaK0Eun5ecgV+n16p3myM7mKc+I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=JfzIO/Xy; 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="JfzIO/Xy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 821C4C4CED3; Fri, 27 Dec 2024 15:07:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1735312032; bh=AUkGyAMnyo3UVOU6MFcMgMJOFsCnXRbhs34OxbmhPw8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=JfzIO/Xyl+Yp6JlAH2pVV1khNGOE5MefMlEfuBUh2/pt+1Vgtq1o3N/5s8QGoJuUR WMIY2Thvq0up1vsCD8Jx7Dcf2n31zgr/rqPUqfqldSr1WpW6BfSP/HjPLeWMpw9d6v RwiJwLBbJ1SgN8ugXGTSSTTZwvhrMiRRlXc/X9uU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-56663: wifi: nl80211: fix NL80211_ATTR_MLO_LINK_ID off-by-one Date: Fri, 27 Dec 2024 16:07:00 +0100 Message-ID: <2024122752-CVE-2024-56663-66d7@gregkh> X-Mailer: git-send-email 2.47.1 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=4317; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=AUkGyAMnyo3UVOU6MFcMgMJOFsCnXRbhs34OxbmhPw8=; b=owGbwMvMwCRo6H6F97bub03G02pJDOl5h3q2yh6InCp0SPbOuScvV8x/P2mznH5qy9dZBic+K CZeNWIL7IhlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJWOkxzPcyuKIffODt1/jd xbf4db6usNRytWRYsGtl26WOKXo7Ba1yHm/cfzgpwjCnHwA= 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: wifi: nl80211: fix NL80211_ATTR_MLO_LINK_ID off-by-one Since the netlink attribute range validation provides inclusive checking, the *max* of attribute NL80211_ATTR_MLO_LINK_ID should be IEEE80211_MLD_MAX_NUM_LINKS - 1 otherwise causing an off-by-one. One crash stack for demonstration: ================================================================== BUG: KASAN: wild-memory-access in ieee80211_tx_control_port+0x3b6/0xca0 net/mac80211/tx.c:5939 Read of size 6 at addr 001102080000000c by task fuzzer.386/9508 CPU: 1 PID: 9508 Comm: syz.1.386 Not tainted 6.1.70 #2 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x177/0x231 lib/dump_stack.c:106 print_report+0xe0/0x750 mm/kasan/report.c:398 kasan_report+0x139/0x170 mm/kasan/report.c:495 kasan_check_range+0x287/0x290 mm/kasan/generic.c:189 memcpy+0x25/0x60 mm/kasan/shadow.c:65 ieee80211_tx_control_port+0x3b6/0xca0 net/mac80211/tx.c:5939 rdev_tx_control_port net/wireless/rdev-ops.h:761 [inline] nl80211_tx_control_port+0x7b3/0xc40 net/wireless/nl80211.c:15453 genl_family_rcv_msg_doit+0x22e/0x320 net/netlink/genetlink.c:756 genl_family_rcv_msg net/netlink/genetlink.c:833 [inline] genl_rcv_msg+0x539/0x740 net/netlink/genetlink.c:850 netlink_rcv_skb+0x1de/0x420 net/netlink/af_netlink.c:2508 genl_rcv+0x24/0x40 net/netlink/genetlink.c:861 netlink_unicast_kernel net/netlink/af_netlink.c:1326 [inline] netlink_unicast+0x74b/0x8c0 net/netlink/af_netlink.c:1352 netlink_sendmsg+0x882/0xb90 net/netlink/af_netlink.c:1874 sock_sendmsg_nosec net/socket.c:716 [inline] __sock_sendmsg net/socket.c:728 [inline] ____sys_sendmsg+0x5cc/0x8f0 net/socket.c:2499 ___sys_sendmsg+0x21c/0x290 net/socket.c:2553 __sys_sendmsg net/socket.c:2582 [inline] __do_sys_sendmsg net/socket.c:2591 [inline] __se_sys_sendmsg+0x19e/0x270 net/socket.c:2589 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x45/0x90 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd Update the policy to ensure correct validation. The Linux kernel CVE team has assigned CVE-2024-56663 to this issue. Affected and fixed versions =========================== Issue introduced in 6.0 with commit 7b0a0e3c3a88260b6fcb017e49f198463aa62ed1 and fixed in 6.1.121 with commit 29e640ae641b9f5ffc666049426d2b16c98d9963 Issue introduced in 6.0 with commit 7b0a0e3c3a88260b6fcb017e49f198463aa62ed1 and fixed in 6.6.67 with commit f3412522f78826fef1dfae40ef378a863df2591c Issue introduced in 6.0 with commit 7b0a0e3c3a88260b6fcb017e49f198463aa62ed1 and fixed in 6.12.6 with commit f850d1d9f1106f528dfc5807565f2d1fa9a397d3 Issue introduced in 6.0 with commit 7b0a0e3c3a88260b6fcb017e49f198463aa62ed1 and fixed in 6.13-rc3 with commit 2e3dbf938656986cce73ac4083500d0bcfbffe24 Issue introduced in 5.19.2 with commit 7a53ad13c09150076b7ddde96c2dfc5622c90b45 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-56663 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/wireless/nl80211.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/29e640ae641b9f5ffc666049426d2b16c98d9963 https://git.kernel.org/stable/c/f3412522f78826fef1dfae40ef378a863df2591c https://git.kernel.org/stable/c/f850d1d9f1106f528dfc5807565f2d1fa9a397d3 https://git.kernel.org/stable/c/2e3dbf938656986cce73ac4083500d0bcfbffe24