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 D529CE567 for ; Thu, 1 May 2025 14:13:42 +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=1746108822; cv=none; b=OtG+90nArvW05FLkX8wZhbe7RTV7Ah8fWvR2/KyIrwDGUEa99vbqEI4Vq4w4PZTKGCnLAPRxw4LkoOCyEQpT1hLS1Px8alnM+kQ68smp/36SteKFTh2o3+oAazi3CpdTwHAIP8pyR5FbVYPDJZg2Da2qcMtyopiMoerGBrYpgww= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746108822; c=relaxed/simple; bh=O4f0JLXP0HIZhiZeAwiFTJ++nyjNWorkO0gCNC4X4/w=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DAJV4ODblzkhGRGDQcik6fVvQTJbn6dbR5o2LFz09EuRoZCqbGHKQTbZTJo166zJ0wet7km3KuYfbG42HIZo/W2WEBrIzZ13K+UZRU6VoMn/+nWP7JGdZXIP2lvE27lu9cWZrCLKg7YB4HHCtxbbJC5rjnw7dy211FsiETg+XbI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=TZwUaW91; 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="TZwUaW91" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44B5FC4CEE3; Thu, 1 May 2025 14:13:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746108822; bh=O4f0JLXP0HIZhiZeAwiFTJ++nyjNWorkO0gCNC4X4/w=; h=From:To:Cc:Subject:Date:Reply-to:From; b=TZwUaW914M21oukpRXD9hwFrxFFc70TSRecBg7rj12lcZn9Mly1WhuoxnaNMzJsFl OcdFQr4vt89fDUS54dN16oupua7NymtR8LOREPvBTz6rH4bJVI1wGiNEoKRt7Gdc0h 44YcyqU8ySNiU3iseFGr+xYJnzgOgh+gI47OEPAM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49805: net: lan966x: Fix potential null-ptr-deref in lan966x_stats_init() Date: Thu, 1 May 2025 16:09:55 +0200 Message-ID: <2025050127-CVE-2022-49805-56c1@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=2306; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=PiY8coL54rEL1vucA6Gpwb1U+cy0drNWv0tU1Qfc1fU=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnCDTPyVisferBqiUjbH/Hbt3iWNnZNP6awR9fa7cHGy e8iv3+d0xHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATuf6BYX7C4d2hcYWur7SU js3W4tM/djZkRRvDgok7Gfp8l7MKpS2Z/2j6sTtxF6vX3QEA 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: lan966x: Fix potential null-ptr-deref in lan966x_stats_init() lan966x_stats_init() calls create_singlethread_workqueue() and not checked the ret value, which may return NULL. And a null-ptr-deref may happen: lan966x_stats_init() create_singlethread_workqueue() # failed, lan966x->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. The Linux kernel CVE team has assigned CVE-2022-49805 to this issue. Affected and fixed versions =========================== Issue introduced in 5.17 with commit 12c2d0a5b8e2a1afc8c7738e19a0d1dd7f3d4007 and fixed in 6.0.10 with commit 4a43c1c6040e848e1344c7b16ac696b68fbc439c Issue introduced in 5.17 with commit 12c2d0a5b8e2a1afc8c7738e19a0d1dd7f3d4007 and fixed in 6.1 with commit ba86af3733aece88dbcee0dfebf7e2dcfefb2be4 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-49805 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/lan966x/lan966x_ethtool.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/4a43c1c6040e848e1344c7b16ac696b68fbc439c https://git.kernel.org/stable/c/ba86af3733aece88dbcee0dfebf7e2dcfefb2be4