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 2FB1B79950 for ; Wed, 22 May 2024 06:20:54 +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=1716358855; cv=none; b=NgkQl7ZJ8rchI2HPOjVe4pzJx+9uXaikf7L4bZGtEA8ythyuRguIe4OZRxHmuWlBcDOK0C/vim+C2y1nT+ieVKF9zdEbMZO5lpQ12IVY/Js2dLMxFzaVBzmwItC1MnJOKUi+SRxYOo7U3uifXyCbdNZTKkaQ30u5wVJJyGzFs0w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716358855; c=relaxed/simple; bh=jQN5l/87iuZRYXrcf0ansSVuCtFJWHF4igMVA8sLxno=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=oCM3cXKl+BHrlFVH+FCMKS68xM2m/r1exYzKW4LQpE8HMhCpZzG69TlaebDm8lwK+0/gHmH0tFq4e0SILbfSN/ZiiV6OWIFaPQNMfbIVFFw8gFghzsXpDzTyKU8n3444q7aoSMsJ8avMAqyxUqjbSxblsM54ex6SedFADeG/Dew= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=gri84Pqj; 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="gri84Pqj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4AF43C2BD11; Wed, 22 May 2024 06:20:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716358854; bh=jQN5l/87iuZRYXrcf0ansSVuCtFJWHF4igMVA8sLxno=; h=From:To:Cc:Subject:Date:Reply-to:From; b=gri84PqjJ/+2ndXc4XmP31TfSxXce8/Cmlo22nOm5Vvo6Fc+6vJ/OBmaeLLKmdoWS bf8A4Cc9Z8tInfiiqkzXdb23OB2ENTNj27tjn41ZnUnS5SfO9L+JFlmgqXTouHVwlU dN7b4mI/xBXnZ4nfKP1/YxY0eDigQxu9t1D/EO6o= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47439: net: dsa: microchip: Added the condition for scheduling ksz_mib_read_work Date: Wed, 22 May 2024 08:19:42 +0200 Message-ID: <2024052239-CVE-2021-47439-b411@gregkh> X-Mailer: git-send-email 2.45.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=2572; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=jQN5l/87iuZRYXrcf0ansSVuCtFJWHF4igMVA8sLxno=; b=owGbwMvMwCRo6H6F97bub03G02pJDGm+fdVXDrjmbPReXsRnsjipULe4Y2VrovG68zte3Vx9p W5DxrZfHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRgI8Mc+Vd723/veAb49H4 neeDTK1XqTx+MpFhrsBKnZ/xgpfLEwzfHX7F0jfjTooDKwA= 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: dsa: microchip: Added the condition for scheduling ksz_mib_read_work When the ksz module is installed and removed using rmmod, kernel crashes with null pointer dereferrence error. During rmmod, ksz_switch_remove function tries to cancel the mib_read_workqueue using cancel_delayed_work_sync routine and unregister switch from dsa. During dsa_unregister_switch it calls ksz_mac_link_down, which in turn reschedules the workqueue since mib_interval is non-zero. Due to which queue executed after mib_interval and it tries to access dp->slave. But the slave is unregistered in the ksz_switch_remove function. Hence kernel crashes. To avoid this crash, before canceling the workqueue, resetted the mib_interval to 0. v1 -> v2: -Removed the if condition in ksz_mib_read_work The Linux kernel CVE team has assigned CVE-2021-47439 to this issue. Affected and fixed versions =========================== Issue introduced in 5.7 with commit 469b390e1ba3 and fixed in 5.10.75 with commit f2e1de075018 Issue introduced in 5.7 with commit 469b390e1ba3 and fixed in 5.14.14 with commit 383239a33cf2 Issue introduced in 5.7 with commit 469b390e1ba3 and fixed in 5.15 with commit ef1100ef20f2 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-47439 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/microchip/ksz_common.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/f2e1de075018cf71bcd7d628e9f759cb8540b0c3 https://git.kernel.org/stable/c/383239a33cf29ebee9ce0d4e0e5c900b77a16148 https://git.kernel.org/stable/c/ef1100ef20f29aec4e62abeccdb5bdbebba1e378