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 322681DC99C for ; Thu, 1 May 2025 14:14:18 +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=1746108858; cv=none; b=rvcRAgroJXQLZnYEmNqU/Q90m9h50gpvdc0hpVRwoCnIbK5ayy7Nz+87dsxec+BtEGNFt7B3uJ1usJfH/ps/aLU4rxE/maT4ackLdZHbv7+EEhd/TTpQwLFv3IDHRf2n+1MK9GcmPXs3dqxGb9yN4YLO0MwWLtXmUp/Zhbtiepk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746108858; c=relaxed/simple; bh=PfivqqSsSRyyz+YeECtzln2WfeMyLu4uDYA0skCq0ts=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=XWXTjgvDCZU/QWDL8DRyEeqZeCOu3evQJ2qD3oV7Tl6yE7NGl+R3e7lqOmqhKWiuAmAPFi39as/KZC7YvAce8a+Ku/GmzrxbTYX5Qe4/gM9IZ1N7N/bVeiJtTN7anMBvKTDnaOd3IjwzAWvWA29et59x6wrwTgGcbGFhxwimWL0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ZIVM0s9I; 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="ZIVM0s9I" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 950A9C4CEE3; Thu, 1 May 2025 14:14:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746108858; bh=PfivqqSsSRyyz+YeECtzln2WfeMyLu4uDYA0skCq0ts=; h=From:To:Cc:Subject:Date:Reply-to:From; b=ZIVM0s9IvfMSWIkTXByYkGsVx2ametLOlxPrn7ASkgvR3pNmQbagVwNX78beJbgSS LccCPPlZsd2txMOa02gK5IeVPIzbsjhaklW4UWMuLBdgxHNLhOH0ez6BWgUzdzSrcU 5u6rrPwbIQNH6Op9pxGebK2Ki0Mmaa6WSlwFR6jw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49806: net: microchip: sparx5: Fix potential null-ptr-deref in sparx_stats_init() and sparx5_start() Date: Thu, 1 May 2025 16:09:56 +0200 Message-ID: <2025050128-CVE-2022-49806-c461@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=2632; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Ud9RrzyMcH5daLGAbgTjLSNnQUJHI2kJwd35t3qq650=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnCDTMsWG9sW9rvyDL13wP2gw81o94m3uTPXm3/vNpT4 /XMp++YOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAi6T8ZFlxYq1thdGRhQf/H 1K3nzELrEj4rWzMsmFJeMUNoj/4x0dt7bhhmfX3dMtt6KQA= 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: net: microchip: sparx5: Fix potential null-ptr-deref in sparx_stats_init() and sparx5_start() sparx_stats_init() calls create_singlethread_workqueue() and not checked the ret value, which may return NULL. And a null-ptr-deref may happen: sparx_stats_init() create_singlethread_workqueue() # failed, sparx5->stats_queue is NULL queue_delayed_work() queue_delayed_work_on() __queue_delayed_work() # warning here, but continue __queue_work() # access wq->flags, null-ptr-deref Check the ret value and return -ENOMEM if it is NULL. So as sparx5_start(). The Linux kernel CVE team has assigned CVE-2022-49806 to this issue. Affected and fixed versions =========================== Issue introduced in 5.14 with commit b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2 and fixed in 5.15.80 with commit 80e590aeb132887102c3fa79d99b338f099dc952 Issue introduced in 5.14 with commit b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2 and fixed in 6.0.10 with commit 456327e565dc49d18b2f595f39f47df8a36f1057 Issue introduced in 5.14 with commit b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2 and fixed in 6.1 with commit 639f5d006e36bb303f525d9479448c412b720c39 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-2022-49806 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/microchip/sparx5/sparx5_ethtool.c drivers/net/ethernet/microchip/sparx5/sparx5_main.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/80e590aeb132887102c3fa79d99b338f099dc952 https://git.kernel.org/stable/c/456327e565dc49d18b2f595f39f47df8a36f1057 https://git.kernel.org/stable/c/639f5d006e36bb303f525d9479448c412b720c39