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 21EC7170A11 for ; Wed, 18 Jun 2025 11:08:24 +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=1750244905; cv=none; b=O1FSAeZ73s2TjojVHrITle3djPebcU1IgyqcXhTB+cAbe+O0Qwnsrwf7tjjUg0YJlkGaiF89OX5UuddF8ha32jkHq9J6kRt+emR7WHCQKj/N30Vq6Fy/0RrvDWfR7bPE4gNBlDAjvElGYrO7lkrKTqa2WWz8ZXFBtQCCJdHFHjI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750244905; c=relaxed/simple; bh=kXnGTojSUyknSmpUyZbyJR9TEWR5TPxlFiObLpDhidY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DYklZLBpUW+KeCDRLV+mBfMUdirGKs3C+LA4/jadiwggvlB/q3m6U7UJdbN+xO47agpX68gvRidzHWxamsByUSV+Q7wBHueDsl9fVpSOy8twfMXWwvf384RttMJEA6k7rc6ADHhyrFWcxLRRjoJZOzDLF0XdM0HsrhlKbpXs5Sw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KMg0rBGl; 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="KMg0rBGl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1668AC4CEF0; Wed, 18 Jun 2025 11:08:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750244904; bh=kXnGTojSUyknSmpUyZbyJR9TEWR5TPxlFiObLpDhidY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=KMg0rBGlfq6whGoJAwYv/eHZrnFY4BHfyY/eFhJIhin4Nk+CZ9hleznchRkR7icNA dWXhNBLbkOXReyBtsaRVN22PBWIcDIN7e7lz8MvAzo/7yCo25DKrI5mYYriCOQs/19 IOl4geok3q8k/SMpjHrlE4H5/ECZu2cacPR9LzSw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50040: net: dsa: sja1105: fix buffer overflow in sja1105_setup_devlink_regions() Date: Wed, 18 Jun 2025 13:01:45 +0200 Message-ID: <2025061842-CVE-2022-50040-08fa@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=2444; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=bUcN4ebD/bxlNtB7VPaQbRX1aWywLtYL5+NLYjrHBU0=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlBc6LWr96nlyJxJs1Njr1F9Nuv1xWvXiWbRoYt/Vqx6 +8Ds8s7O2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiqyUY5kr/eeQSOXPvJq/9 am957FU5tk3j/s0wi/nNn9/S0fnbll4vUhIrsyq7YeQTAAA= 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: dsa: sja1105: fix buffer overflow in sja1105_setup_devlink_regions() If an error occurs in dsa_devlink_region_create(), then 'priv->regions' array will be accessed by negative index '-1'. Found by Linux Verification Center (linuxtesting.org) with SVACE. The Linux kernel CVE team has assigned CVE-2022-50040 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10 with commit bf425b82059e0b0752c0026353c1902112200837 and fixed in 5.10.138 with commit 7983e1e44cb322eba6af84160b6d18df80603fb8 Issue introduced in 5.10 with commit bf425b82059e0b0752c0026353c1902112200837 and fixed in 5.15.63 with commit e84c6321f3578c38cb3c24258db91a92672b17a8 Issue introduced in 5.10 with commit bf425b82059e0b0752c0026353c1902112200837 and fixed in 5.19.4 with commit 79f86b862416126a2e826cb74224180d6625a32f Issue introduced in 5.10 with commit bf425b82059e0b0752c0026353c1902112200837 and fixed in 6.0 with commit fd8e899cdb5ecaf8e8ee73854a99e10807eef1de 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-50040 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/dsa/sja1105/sja1105_devlink.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/7983e1e44cb322eba6af84160b6d18df80603fb8 https://git.kernel.org/stable/c/e84c6321f3578c38cb3c24258db91a92672b17a8 https://git.kernel.org/stable/c/79f86b862416126a2e826cb74224180d6625a32f https://git.kernel.org/stable/c/fd8e899cdb5ecaf8e8ee73854a99e10807eef1de