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 8B8711E0B93 for ; Thu, 7 Nov 2024 09:35:57 +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=1730972157; cv=none; b=Ald6M1kSGd4vLj4QdqsyNMn/K/ZjdbYH3AtlTmHrEAaA85mD5imVvdlrRJoEtbYREjC6QDcJFl/Znm7uWXfwoQn3iq5GmCQadAyqSsfhK5WDHHA9cR2DpWREEdO4jLtWHajyEaX7GHJIeQQHFqRsttp81SvmMDAQhopDiSDAy/U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730972157; c=relaxed/simple; bh=JpwWGYypgGSC4Cd/ziPw9v36BzQ0SoRCHX4Ltp5U6uc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gfmBngTocTx1bQSEX0Y+Fpm/OYAVeRcNYaLoJj/EfZ2P4f1on+Me4NvmoiS148ypqCsapvvqM/XUS3EkChWx0AmoYGjop6z3a1Mk+wj1sx2nlxwnNtCH/0dP8ru5AW/bbOGqS+8cJ4fHPURK1FSQijZzUFYOCvHvxpfUcgu3+3Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=h2h1etrG; 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="h2h1etrG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB2F4C4CED0; Thu, 7 Nov 2024 09:35:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1730972157; bh=JpwWGYypgGSC4Cd/ziPw9v36BzQ0SoRCHX4Ltp5U6uc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=h2h1etrGCGp7MilAF2rHyyhyAJFU5j2GJOfaI2ffOaIH8KkkGJrEaJVw3WeNzfmCm K5gY+ijTsX+Sp04GVtmL6lh0EhCmHZY0IFq1XqiFf4Zb8a1BL7oGcQLYiSpPbtknyZ GRLMbpYZlpwz2CZkKNDsRtrknsJeN5AnMDOD7Wu0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50145: octeon_ep: Add SKB allocation failures handling in __octep_oq_process_rx() Date: Thu, 7 Nov 2024 10:34:45 +0100 Message-ID: <2024110744-CVE-2024-50145-10b6@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=2868; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=JpwWGYypgGSC4Cd/ziPw9v36BzQ0SoRCHX4Ltp5U6uc=; b=owGbwMvMwCRo6H6F97bub03G02pJDOk6nVsmaKUVeZ8+z9/eteu9+7X/b28z3crfwXWywbRQ9 PRaBymLjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZhI8SqGBfNM6qumOzvz7TkZ t+Br70WuvTFzvzDMs5K+tGjvsR+NhxR2VGVeLSnjeCkRBgA= 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: octeon_ep: Add SKB allocation failures handling in __octep_oq_process_rx() build_skb() returns NULL in case of a memory allocation failure so handle it inside __octep_oq_process_rx() to avoid NULL pointer dereference. __octep_oq_process_rx() is called during NAPI polling by the driver. If skb allocation fails, keep on pulling packets out of the Rx DMA queue: we shouldn't break the polling immediately and thus falsely indicate to the octep_napi_poll() that the Rx pressure is going down. As there is no associated skb in this case, don't process the packets and don't push them up the network stack - they are skipped. Helper function is implemented to unmmap/flush all the fragment buffers used by the dropped packet. 'alloc_failures' counter is incremented to mark the skb allocation error in driver statistics. Found by Linux Verification Center (linuxtesting.org) with SVACE. The Linux kernel CVE team has assigned CVE-2024-50145 to this issue. Affected and fixed versions =========================== Issue introduced in 5.19 with commit 37d79d059606 and fixed in 6.1.115 with commit 09ce491112bb Issue introduced in 5.19 with commit 37d79d059606 and fixed in 6.6.59 with commit c2d2dc4f88bb Issue introduced in 5.19 with commit 37d79d059606 and fixed in 6.11.6 with commit 2dedcb6f99f4 Issue introduced in 5.19 with commit 37d79d059606 and fixed in 6.12-rc5 with commit eb592008f79b 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-50145 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/marvell/octeon_ep/octep_rx.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/09ce491112bbf0b866e2638d3e961c1c73d1f00b https://git.kernel.org/stable/c/c2d2dc4f88bb3cfc4f3cc320fd3ff51b0ae5b0ea https://git.kernel.org/stable/c/2dedcb6f99f4c1a11944e7cc35dbeb9b18a5cbac https://git.kernel.org/stable/c/eb592008f79be52ccef88cd9a5249b3fc0367278