Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 CAC502ECD1D for ; Thu, 25 Jun 2026 09:46:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782380762; cv=none; b=s3d4RZCRhaXQpf0ecEJB4N1TWTMnvDfFxicoHER4MkVgIJv99IOI29c0ZqqUNEEHdRHYEOMQf4OWPYSNv7mJPMus6pLHVG2BEImegfrMuDzuh55lFsZXQ1fvh0RSaVhQq06QpW488YZlyTwx3C4RTQyx268QsH0QxTExJ+jyzw8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782380762; c=relaxed/simple; bh=39zMZ2z0PsTyoYTe77a9H6SGw9Q2ZylSk5zs7xF+s5s=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=tO5jFtGIk6Y1avtzDQfUqabyb0ibi00DZ49FeBICeGPZnhd59qaM0vZcHy01BDInAlDKqqWgMSU+KIX481jdDfFa+GRZUV4+wEIu3gBsz2bJ7YH6fXhCWKeOIQzI/y236NtEVIGFI0rUoB7ZxaahSiWc//VL58SSKxbXs00iwMk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=1pcqIZc4; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="1pcqIZc4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 369F11F000E9; Thu, 25 Jun 2026 09:46:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1782380761; bh=QAa6eLo57vWXsM5Qo2cGhPWJ2fga+oY+Xti+eVYAa2E=; h=From:To:Cc:Subject:Date:Reply-To; b=1pcqIZc4Z3uTZeMkghnrRSpvkNkkmbZTWMEPHXYR+V3lBpdI6RWmSAg0kb+Fy/hUs EgApt6ZpSaGQis81VVp3NsgLrqxF6qcY8rqXgiJd9Cb30Wo4oVCWnCTja/rfztJ5Tr mfyf1mnbMN+IeviMQQHQrtwBq3ogsmIRvTkKyGFM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-53234: net: ibm: emac: Fix use-after-free during device removal Date: Thu, 25 Jun 2026 09:41:22 +0100 Message-ID: <2026062509-CVE-2026-53234-54f9@gregkh> X-Mailer: git-send-email 2.54.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3466; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=7fTTRFUIlO4GN3JbCVo1w9WvC23i5+gsAmULQW8IKIw=; b=owGbwMvMwCRo6H6F97bub03G02pJDFk2LzNNvpprNJ76v3VqwdZ9efZ6c6/ONma6feCXq2KEZ 3macdebjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZhIznSGBcckTLfnycdf372m 8tihBLOtr+R/+TLMlS9dNOGQQsecrz3/Hu+4bmhjl5Z3DAA= 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: ibm: emac: Fix use-after-free during device removal The driver was using devm_register_netdev() which causes unregister_netdev() to be deferred until the devres cleanup phase, which runs after emac_remove() returns. This creates a use-after-free window where: 1. emac_remove() is called, which tears down hardware (cancels work, detaches modules, unregisters from MAL) 2. emac_remove() returns 3. devres cleanup runs and finally calls unregister_netdev() During step 3, the network stack might still process packets, triggering emac_irq(), emac_poll(), or other handlers that access now-freed hardware resources (dev->emacp, dev->mal, etc.). Fix this by replacing devm_register_netdev() with manual register_netdev() and calling unregister_netdev() at the beginning of emac_remove(), before any hardware teardown. This ensures the network device is fully stopped and unregistered before hardware resources are released. The change is safe because: - dev->ndev is assigned very early in probe (before any error paths that could bypass emac_remove) - platform_set_drvdata() is only called after successful registration, so emac_remove() only runs for fully registered devices - unregister_netdev() is idempotent and safe to call on any registered device The Linux kernel CVE team has assigned CVE-2026-53234 to this issue. Affected and fixed versions =========================== Issue introduced in 6.12 with commit a4dd8535a527061a01f2fd335596fa77ca240a96 and fixed in 6.12.94 with commit cf8e14db93eaecc4c0c58299be3b3183b0e53ed5 Issue introduced in 6.12 with commit a4dd8535a527061a01f2fd335596fa77ca240a96 and fixed in 6.18.36 with commit c09c2e236eef6f59e105f38a30f5439e6ccbcad7 Issue introduced in 6.12 with commit a4dd8535a527061a01f2fd335596fa77ca240a96 and fixed in 7.0.13 with commit c12584cd6078085d707266be864e7e1cc91d74e3 Issue introduced in 6.12 with commit a4dd8535a527061a01f2fd335596fa77ca240a96 and fixed in 7.1 with commit a0130d682222ae21afc395aead7cd2d87e1a8358 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-2026-53234 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/ibm/emac/core.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/cf8e14db93eaecc4c0c58299be3b3183b0e53ed5 https://git.kernel.org/stable/c/c09c2e236eef6f59e105f38a30f5439e6ccbcad7 https://git.kernel.org/stable/c/c12584cd6078085d707266be864e7e1cc91d74e3 https://git.kernel.org/stable/c/a0130d682222ae21afc395aead7cd2d87e1a8358