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 2732A253F22 for ; Thu, 17 Apr 2025 18:58: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=1744916292; cv=none; b=GqWJ4CZyKqi/c3KXpyUc8MtpKF/2lRpqtVwjpH/Qkc+uJtjMTcwIndLjVmkY0WZw2ZiBtaEWaCToYPahgEdcg+gZKMDUZ1NusQPsyrqCsdA8+/6gnaXyug+m/LWS1Bvuj6jl/U30Sbr+ag7yX1IS6lSGQcuatQ+DQBePTdh54FM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744916292; c=relaxed/simple; bh=SeF3u1LERzm+pt+n6dGVvIBvNxhxcdfqDXXi9eICaGE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=C9EkebIE/r1jd1jhko0+JHzbYu+FFoEGZvBfi/tCA0L/N+7Jl7GysJCYiK/Elq+17axQqFPsxGmWdr4EQuRUMhW6BtQgAL0YqrQT7sQOS2SzUGXSUM+U8l/QLoxk8VDl1O5tsJ84x9oDmiO4ovlQeh81kXtp0EBB2syiP58Yndk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=JnRNavhY; 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="JnRNavhY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3D9AC4CEE4; Thu, 17 Apr 2025 18:58:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744916292; bh=SeF3u1LERzm+pt+n6dGVvIBvNxhxcdfqDXXi9eICaGE=; h=From:To:Cc:Subject:Date:Reply-to:From; b=JnRNavhY0PSiTB/8xHe3nJ0ZB8KOen9pkUMs2IDNB3Gtx8143Lfga4SmeClkHg0Rr X7bjsuSnLQboKqjG5JjKw59hTG3dcC/ZYDlJG3m9MjWkwyJXwx9f5t85lteoox3v1J aIw78V07Kx/vpSwHa6b1G7iwMQogEbkvI/oBxs08= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47671: can: etas_es58x: es58x_rx_err_msg(): fix memory leak in error path Date: Thu, 17 Apr 2025 20:01:37 +0200 Message-ID: <2025041735-CVE-2021-47671-9b1a@gregkh> X-Mailer: git-send-email 2.49.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=2443; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=U9sz2YSBWptvRq8jLxXYmapkA0HSnlDp4q4RoNwhHsk=; b=owGbwMvMwCRo6H6F97bub03G02pJDBmMjv9NljfOXtb7tLzDcrmFMkux8uNNntIfTs3o3+WRc cPvWcCrjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjIOjOG+U57VE3/bbyjp9N9 T8st2PCJIaslL8M8A5+eSx+izvR6SBzqvMO0Y+teq2h1AA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: can: etas_es58x: es58x_rx_err_msg(): fix memory leak in error path In es58x_rx_err_msg(), if can->do_set_mode() fails, the function directly returns without calling netif_rx(skb). This means that the skb previously allocated by alloc_can_err_skb() is not freed. In other terms, this is a memory leak. This patch simply removes the return statement in the error branch and let the function continue. Issue was found with GCC -fanalyzer, please follow the link below for details. The Linux kernel CVE team has assigned CVE-2021-47671 to this issue. Affected and fixed versions =========================== Issue introduced in 5.13 with commit 8537257874e949a59c834cecfd5a063e11b64b0b and fixed in 5.14.19 with commit 4f389e1276a5389c92cef860c9fde8e1c802a871 Issue introduced in 5.13 with commit 8537257874e949a59c834cecfd5a063e11b64b0b and fixed in 5.15.3 with commit 7eb0881aec26099089f12ae850aebd93190b1dfe Issue introduced in 5.13 with commit 8537257874e949a59c834cecfd5a063e11b64b0b and fixed in 5.16 with commit d9447f768bc8c60623e4bb3ce65b8f4654d33a50 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-47671 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/usb/etas_es58x/es58x_core.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/4f389e1276a5389c92cef860c9fde8e1c802a871 https://git.kernel.org/stable/c/7eb0881aec26099089f12ae850aebd93190b1dfe https://git.kernel.org/stable/c/d9447f768bc8c60623e4bb3ce65b8f4654d33a50