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 A698E1A4E98 for ; Wed, 26 Feb 2025 01:59:43 +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=1740535183; cv=none; b=rsDlE9J707aT7VqpssrEac49JN+XSz8ICrsIf/EOp1djMJhWcB6eakEAbac0l/fFskGDibtpkrJ08jkCTk+q9uU7PLFSZJ6R6gdgIEYTGdMv2E9FmG9T+38jQgoAGGlCD/hp1kR5Q5e3oNo0S1S37amPA3SzH7cjIFjaKbnMtd4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740535183; c=relaxed/simple; bh=AIwXD9ZFrcR9QxThpoVt7cHZxVdumRQ/XnGSWnDFwzo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=NTYNYcsWLtdmtcaoOBWYsg0319CTZ7jqvN8zEG0WAy9lRCiXDVNhpoGOz6wjrexsDQB+vYk/EVQa3+rvog2hJCGMQPo2LT3RyzePE+pAcT9XgejNaUNR1mlQ4mjmgYf5/1m2X/pb6tmvgH/0XkzxpOwQ4WyepDMxjnSrOX+72uU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=g5v1NDGY; 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="g5v1NDGY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 777D1C4CEDD; Wed, 26 Feb 2025 01:59:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740535183; bh=AIwXD9ZFrcR9QxThpoVt7cHZxVdumRQ/XnGSWnDFwzo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=g5v1NDGY4Ynnpy3o+NQgLLKO+uCmxCsNgOWh5GZV6B2JAtPeC4vHbBVWGv4MolcG8 z19hjzycVU9BdKIpsa/Yl1ZPZXHhw27f0WDYfB5ZBIThxDmYYWFM158UCzJW+04NNX fJyQRYGlugr+5GlK9qzr2jVaUedKnMDzSRFlRExI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49226: net: asix: add proper error handling of usb read errors Date: Wed, 26 Feb 2025 02:57:11 +0100 Message-ID: <2025022622-CVE-2022-49226-b30c@gregkh> X-Mailer: git-send-email 2.48.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=2813; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=AIwXD9ZFrcR9QxThpoVt7cHZxVdumRQ/XnGSWnDFwzo=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7SvyONU5YeqYgs9CIfwZLh6zCznV3ArV2CzTLCP0uX 7b1eur0jlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiIFAPDguXJJQY9LSuVnt7y b/75UfS0xMU/+QwL1r/n+jnnwWvZrateSB9sWB/NvTj3HAA= 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: net: asix: add proper error handling of usb read errors Syzbot once again hit uninit value in asix driver. The problem still the same -- asix_read_cmd() reads less bytes, than was requested by caller. Since all read requests are performed via asix_read_cmd() let's catch usb related error there and add __must_check notation to be sure all callers actually check return value. So, this patch adds sanity check inside asix_read_cmd(), that simply checks if bytes read are not less, than was requested and adds missing error handling of asix_read_cmd() all across the driver code. The Linux kernel CVE team has assigned CVE-2022-49226 to this issue. Affected and fixed versions =========================== Issue introduced in 4.9 with commit d9fe64e511144c1ee7d7555b4111f09dde9692ef and fixed in 5.15.33 with commit b96a7265f763b37ff3138b9ca8122a950f13b00e Issue introduced in 4.9 with commit d9fe64e511144c1ee7d7555b4111f09dde9692ef and fixed in 5.16.19 with commit 9ea8d2fca8fea3b17005b4dc02f8ef15f7a2fb97 Issue introduced in 4.9 with commit d9fe64e511144c1ee7d7555b4111f09dde9692ef and fixed in 5.17.2 with commit 662ff765470ad0d11a1153d6d8e99d69a98e60b4 Issue introduced in 4.9 with commit d9fe64e511144c1ee7d7555b4111f09dde9692ef and fixed in 5.18 with commit 920a9fa27e7805499cfe78491b36fed2322c02ec 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-49226 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/usb/asix.h drivers/net/usb/asix_common.c drivers/net/usb/asix_devices.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/b96a7265f763b37ff3138b9ca8122a950f13b00e https://git.kernel.org/stable/c/9ea8d2fca8fea3b17005b4dc02f8ef15f7a2fb97 https://git.kernel.org/stable/c/662ff765470ad0d11a1153d6d8e99d69a98e60b4 https://git.kernel.org/stable/c/920a9fa27e7805499cfe78491b36fed2322c02ec