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 57E521F428F for ; Fri, 27 Dec 2024 13:55:34 +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=1735307734; cv=none; b=D7Vpmyt390bMfCkHdPEXw+kqk39cvcRi5i1qfavNoZPp4TLVvrmg/BzYNQ8JJiQRQ+T6Og4x1jMp3Xa2rc0M0DPfPutspqxO9Js9cGgE4dqeIx4zYGoGvuvSZq7sh7v0k/jRTgfNH6d0rTbB1mGALeTdtr0htY69jIptTd9CaAU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735307734; c=relaxed/simple; bh=nqZC4oz0Xh7ue/uPspOoKLwz0VFYxmF0Wamz6oLsE7c=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=MMwbI1VI1UeA0bOBs8RQjVVGXt+fNlTkQu8SVD5zCyWmE49dZpHccF9ZvOlxFbLFS9l8gc7upAl6F5WL7OUzLZCElVplOm9fWsnZ6Di4ps40VznCUmPnQeYskf+uYwraOxEVDjxUc0X/95+wPursEIAeH14OdnZtGh7lulbQilU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=tjE00l+G; 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="tjE00l+G" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5DDBC4CED0; Fri, 27 Dec 2024 13:55:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1735307734; bh=nqZC4oz0Xh7ue/uPspOoKLwz0VFYxmF0Wamz6oLsE7c=; h=From:To:Cc:Subject:Date:Reply-to:From; b=tjE00l+G0Lf1u88iGTW0GmeYKsUCbrA6963RZ+JQevHom3i56as9rxltOVTvju3jw PXZsE5MPG/KmGgUpUSEvqvJYajifpNGSH0GZ4O7vkdhCrxrjLSND3TzvErzfJRKI42 xTb+hrloG8xc3iTY1heQjF+GRT19Z0hEzrfC9KzE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-53213: net: usb: lan78xx: Fix double free issue with interrupt buffer allocation Date: Fri, 27 Dec 2024 14:52:59 +0100 Message-ID: <2024122730-CVE-2024-53213-baa6@gregkh> X-Mailer: git-send-email 2.47.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=2996; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=nqZC4oz0Xh7ue/uPspOoKLwz0VFYxmF0Wamz6oLsE7c=; b=owGbwMvMwCRo6H6F97bub03G02pJDOl5G+WzNrSxJM7oPmcSJFjG8Df61bGTE9ek/17L8kJOf HqntcuCjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiI+DuGBZ3Kiq9X7Xb0aHl1 8umcxmPTqyWKSxjmpxvPOrvIK2Na193KGA6Ran3FNwsfAgA= 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: usb: lan78xx: Fix double free issue with interrupt buffer allocation In lan78xx_probe(), the buffer `buf` was being freed twice: once implicitly through `usb_free_urb(dev->urb_intr)` with the `URB_FREE_BUFFER` flag and again explicitly by `kfree(buf)`. This caused a double free issue. To resolve this, reordered `kmalloc()` and `usb_alloc_urb()` calls to simplify the initialization sequence and removed the redundant `kfree(buf)`. Now, `buf` is allocated after `usb_alloc_urb()`, ensuring it is correctly managed by `usb_fill_int_urb()` and freed by `usb_free_urb()` as intended. The Linux kernel CVE team has assigned CVE-2024-53213 to this issue. Affected and fixed versions =========================== Issue introduced in 5.17 with commit a6df95cae40bee555e01a37b4023ce8e97ffa249 and fixed in 6.1.120 with commit 977128343fc2a30737399b58df8ea77e94f164bd Issue introduced in 5.17 with commit a6df95cae40bee555e01a37b4023ce8e97ffa249 and fixed in 6.6.64 with commit a422ebec863d99d5607fb41bb7af3347fcb436d3 Issue introduced in 5.17 with commit a6df95cae40bee555e01a37b4023ce8e97ffa249 and fixed in 6.11.11 with commit b09512aea6223eec756f52aa584fc29eeab57480 Issue introduced in 5.17 with commit a6df95cae40bee555e01a37b4023ce8e97ffa249 and fixed in 6.12.2 with commit 7ac9f3c981eeceee2ec4d30d850f4a6f50a1ec40 Issue introduced in 5.17 with commit a6df95cae40bee555e01a37b4023ce8e97ffa249 and fixed in 6.13-rc1 with commit 03819abbeb11117dcbba40bfe322b88c0c88a6b6 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-2024-53213 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/lan78xx.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/977128343fc2a30737399b58df8ea77e94f164bd https://git.kernel.org/stable/c/a422ebec863d99d5607fb41bb7af3347fcb436d3 https://git.kernel.org/stable/c/b09512aea6223eec756f52aa584fc29eeab57480 https://git.kernel.org/stable/c/7ac9f3c981eeceee2ec4d30d850f4a6f50a1ec40 https://git.kernel.org/stable/c/03819abbeb11117dcbba40bfe322b88c0c88a6b6