From mboxrd@z Thu Jan 1 00:00:00 1970 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 173AD12CDB2 for ; Fri, 24 May 2024 15:10:00 +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=1716563400; cv=none; b=g3+BnHeIoZ21WQCWyUlVwsKiCGRBHCdPF7cv8tilaYmHcB27BrDUPDBZF+3FHrV6nLtdIQm6mDD396TLxNeJX1sZHs2hVhWTRlPkUhibRrWAFg7TStXHq9YVl+hgBKycobzuNsDLX6nafTlAReQ6/klVzuKNukoEFBxeAOyMOs4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716563400; c=relaxed/simple; bh=NAVNRzEOZVMcuwO7J+VB5n5Ck/YLAe9VR6ixDbZPCLM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=oWh5mbHXbxgdEIhy8UdNj5/WYz8I8GxsBYWW7iOZ4H398UI6QnKo1amRMIpV70JYUTXKGTQR9018LlpFKO/4OcgO86ftyr9eoqWLPHXXvxQ4rpDa9wBRFObMcn6QmZ/yc/0CAMyinSaAqCy35gFQI0+ZWeIRcu/7LzJv6zNuyao= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=uB5/pFim; 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="uB5/pFim" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B17BC2BBFC; Fri, 24 May 2024 15:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716563399; bh=NAVNRzEOZVMcuwO7J+VB5n5Ck/YLAe9VR6ixDbZPCLM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=uB5/pFimgjNmRnhXoRdsSAVKU1+3McFDwtlkI6xUVjp6Ruh3+juMAlfeeQbCn4/3x AUi1lDqJWw8b6u018jELz3KlQspP8VBS4EALrLG+JeErwDehKssfSnhYctis5gLz+a qdfAjCYr1lgEADxWPWN9e9A9w/Gmdtu7P+8vFS+Y= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47520: can: pch_can: pch_can_rx_normal: fix use after free Date: Fri, 24 May 2024 17:09:40 +0200 Message-ID: <2024052433-CVE-2021-47520-af45@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=2928; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=NAVNRzEOZVMcuwO7J+VB5n5Ck/YLAe9VR6ixDbZPCLM=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkBa9ceuLhh+919PlvEjh7ao/t7/Xq3LWednu9Maiy9f 6DIyOmpfEcsC4MgE4OsmCLLl208R/dXHFL0MrQ9DTOHlQlkCAMXpwBM5LoRw4IN044fKyp41FZt /b+Gjbd2ndxl1csM8zSW6//VXPZzW63Xkm1HmuasKPt40gMA 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: can: pch_can: pch_can_rx_normal: fix use after free After calling netif_receive_skb(skb), dereferencing skb is unsafe. Especially, the can_frame cf which aliases skb memory is dereferenced just after the call netif_receive_skb(skb). Reordering the lines solves the issue. The Linux kernel CVE team has assigned CVE-2021-47520 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.37 with commit b21d18b51b31 and fixed in 4.4.295 with commit bafe343a885c Issue introduced in 2.6.37 with commit b21d18b51b31 and fixed in 4.9.293 with commit 3a3c46e2eff0 Issue introduced in 2.6.37 with commit b21d18b51b31 and fixed in 4.14.258 with commit affbad02bf80 Issue introduced in 2.6.37 with commit b21d18b51b31 and fixed in 4.19.221 with commit 3e193ef4e0a3 Issue introduced in 2.6.37 with commit b21d18b51b31 and fixed in 5.4.165 with commit abb4eff3dcd2 Issue introduced in 2.6.37 with commit b21d18b51b31 and fixed in 5.10.85 with commit 703dde112021 Issue introduced in 2.6.37 with commit b21d18b51b31 and fixed in 5.15.8 with commit 6c73fc931658 Issue introduced in 2.6.37 with commit b21d18b51b31 and fixed in 5.16 with commit 94cddf1e9227 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-2021-47520 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/can/pch_can.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/bafe343a885c70dddf358379cf0b2a1c07355d8d https://git.kernel.org/stable/c/3a3c46e2eff0577454860a203be1a8295f4acb76 https://git.kernel.org/stable/c/affbad02bf80380a7403885b9fe4a1587d1bb4f3 https://git.kernel.org/stable/c/3e193ef4e0a3f5bf92ede83ef214cb09d01b00aa https://git.kernel.org/stable/c/abb4eff3dcd2e583060082a18a8dbf31f02689d4 https://git.kernel.org/stable/c/703dde112021c93d6e89443c070e7dbd4dea612e https://git.kernel.org/stable/c/6c73fc931658d8cbc8a1714b326cb31eb71d16a7 https://git.kernel.org/stable/c/94cddf1e9227a171b27292509d59691819c458db