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 8429D168DC for ; Sun, 19 May 2024 08:37:02 +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=1716107822; cv=none; b=UUtQLsZJwjef+jMPLAoH2yiYG3WQZUd4IgMbx0hUTCFTnOXbVeYpPfi5hYN7CIWXFvoiXyAXNvdtklodhP1R4gcgaXMRE0Pg7C20Dut/pvS2imjbqs4ccqhJ9I4YFWOA1EQ/znn8we1FSV+wG7dpCQruRmWusf7oUERXVtScPGs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716107822; c=relaxed/simple; bh=ybVI140lsVn49HT0l2QxNUhIFpN1qviSeOgS0JPdsXs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Fm8HrZnsuPld0Nsdn9tZHtpftuu9JmDw8h3EZ90MPhKr2hJS1y55gb0Y9HfkWa5qcA4g4fu8eDpcDAGf6R/R5CvhXYrGUCpdJfFPQgcAypGG3qcwrwB1ge0yncbYkXPW5863doRMRjTrZ7rybjSPCGTzGKNm/+GCKDVuxlXos3c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=P2FpB64j; 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="P2FpB64j" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0788EC32781; Sun, 19 May 2024 08:37:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716107822; bh=ybVI140lsVn49HT0l2QxNUhIFpN1qviSeOgS0JPdsXs=; h=From:To:Cc:Subject:Date:Reply-to:From; b=P2FpB64jKRs/ctuIRjuHbKVWYHUIAzToEjMFmVM1dGHDCwZpbDn6BjoSwmmiiUPew GpX2wQQ2Tyg7lKtvxg7hOSyPstjeGUj59xOw6dz+knL3YpFpbyJ81onDai3C5HkdFf FlBqpLLgQo1Bn/7EWATZcoAazdfWrLcdPMYx3Fe8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-35901: net: mana: Fix Rx DMA datasize and skb_over_panic Date: Sun, 19 May 2024 10:35:15 +0200 Message-ID: <2024051952-CVE-2024-35901-6e99@gregkh> X-Mailer: git-send-email 2.45.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=2940; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ybVI140lsVn49HT0l2QxNUhIFpN1qviSeOgS0JPdsXs=; b=owGbwMvMwCRo6H6F97bub03G02pJDGmeO9c0PQ+J4en7sSFM8Eng/ynvpkqqnp7s/ffVa9az4 vPCwgsaO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAia+IY5te/N55vvKmDsaqQ Tf3s6iKxrupaW4YFe3PnBl25du7xGr0VNzjUhL+ZXltwEQA= 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: mana: Fix Rx DMA datasize and skb_over_panic mana_get_rxbuf_cfg() aligns the RX buffer's DMA datasize to be multiple of 64. So a packet slightly bigger than mtu+14, say 1536, can be received and cause skb_over_panic. Sample dmesg: [ 5325.237162] skbuff: skb_over_panic: text:ffffffffc043277a len:1536 put:1536 head:ff1100018b517000 data:ff1100018b517100 tail:0x700 end:0x6ea dev: [ 5325.243689] ------------[ cut here ]------------ [ 5325.245748] kernel BUG at net/core/skbuff.c:192! [ 5325.247838] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI [ 5325.258374] RIP: 0010:skb_panic+0x4f/0x60 [ 5325.302941] Call Trace: [ 5325.304389] [ 5325.315794] ? skb_panic+0x4f/0x60 [ 5325.317457] ? asm_exc_invalid_op+0x1f/0x30 [ 5325.319490] ? skb_panic+0x4f/0x60 [ 5325.321161] skb_put+0x4e/0x50 [ 5325.322670] mana_poll+0x6fa/0xb50 [mana] [ 5325.324578] __napi_poll+0x33/0x1e0 [ 5325.326328] net_rx_action+0x12e/0x280 As discussed internally, this alignment is not necessary. To fix this bug, remove it from the code. So oversized packets will be marked as CQE_RX_TRUNCATED by NIC, and dropped. The Linux kernel CVE team has assigned CVE-2024-35901 to this issue. Affected and fixed versions =========================== Issue introduced in 6.4 with commit 2fbbd712baf1 and fixed in 6.6.26 with commit ca58927b0038 Issue introduced in 6.4 with commit 2fbbd712baf1 and fixed in 6.8.5 with commit 05cb7c41fa1a Issue introduced in 6.4 with commit 2fbbd712baf1 and fixed in 6.9 with commit c0de6ab920aa 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-35901 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/ethernet/microsoft/mana/mana_en.c include/net/mana/mana.h 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/ca58927b00385005f488b6a9905ced7a4f719aad https://git.kernel.org/stable/c/05cb7c41fa1a7a7b2c2a6b81bbe7c67f5c11932b https://git.kernel.org/stable/c/c0de6ab920aafb56feab56058e46b688e694a246