From mboxrd@z Thu Jan 1 00:00:00 1970 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 D1BF16D1D2 for ; Tue, 21 May 2024 14:38:09 +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=1716302290; cv=none; b=Rr48xLfy48VALv6u1hOAOcMpDylEIevkjyROWoHBveqZH0FBYsGWkqs+rfuEH0Pe3NeUu90tVGRHQoejcngLyUM/gXQeFBhfwJ746JkhvLF+s9yQtXwpdH+jIQ7ntwZT9huLpfyGRuh/0RhiH6XGGywYvWAR9waV8DLCpDqzj7Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716302290; c=relaxed/simple; bh=EtgjgJ3Ck6iZOrq96Jg9XSJCyGbYr9nYKM5bSeBXR9I=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=O+7V3NQZoikSTAYx2x2+VAKoZFpQvAnTEjRFJABvzVr4vv9kHIR6WhO6VxW5r5s23tt0uKegIcl4BD9lo+Q7w77ZMCPndyL6jNxQSI5DuPQP5aDY7TbX3XMUXmk2D0X5rWJ36F912cFl133qpelxPJf4utbym4gjcU3G+SpmXsI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=pxfIe91J; 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="pxfIe91J" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2666C2BD11; Tue, 21 May 2024 14:38:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716302289; bh=EtgjgJ3Ck6iZOrq96Jg9XSJCyGbYr9nYKM5bSeBXR9I=; h=From:To:Cc:Subject:Date:Reply-to:From; b=pxfIe91JWYEhZyd+A1pyJ1l61GjPNF9g9EktUl1BsA/QL0y3Yr5OzJWnlcQtlQNuL 11BFjW6ZXtCgyfZg48vrRR4dSW02zEsEHWlPvj+FgSNae0EqFZhGD+0BHZldjVCOUk r6LAH7KPvVx/HswW/UQrqmd3Z3vNX1TeIInBGkCg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47294: netrom: Decrease sock refcount when sock timers expire Date: Tue, 21 May 2024 16:35:28 +0200 Message-ID: <2024052123-CVE-2021-47294-76ec@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=3256; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=EtgjgJ3Ck6iZOrq96Jg9XSJCyGbYr9nYKM5bSeBXR9I=; b=owGbwMvMwCRo6H6F97bub03G02pJDGk+G3ValO67v/8Ufi1u5foDZXdKzSvmhGjJV5snHvsVe j1or69lRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExkoSXD/MqLTgGzPkwQsODa ufz4rqcrjDvVahkWnG7clHj5pFm46u10k9amZyKLjUKbAQ== 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: netrom: Decrease sock refcount when sock timers expire Commit 63346650c1a9 ("netrom: switch to sock timer API") switched to use sock timer API. It replaces mod_timer() by sk_reset_timer(), and del_timer() by sk_stop_timer(). Function sk_reset_timer() will increase the refcount of sock if it is called on an inactive timer, hence, in case the timer expires, we need to decrease the refcount ourselves in the handler, otherwise, the sock refcount will be unbalanced and the sock will never be freed. The Linux kernel CVE team has assigned CVE-2021-47294 to this issue. Affected and fixed versions =========================== Issue introduced in 4.4.173 with commit ce29e8a259de and fixed in 4.4.277 with commit 853262355518 Issue introduced in 4.9.155 with commit baa9e32336bf and fixed in 4.9.277 with commit a01634bf91f2 Issue introduced in 4.14.98 with commit 0adf571fa34b and fixed in 4.14.241 with commit 48866fd5c361 Issue introduced in 4.19.20 with commit 2c6b572458a9 and fixed in 4.19.199 with commit 9619cc7d97c3 Issue introduced in 5.0 with commit 63346650c1a9 and fixed in 5.4.136 with commit 25df44e90ff5 Issue introduced in 5.0 with commit 63346650c1a9 and fixed in 5.10.54 with commit 6811744bd0ef Issue introduced in 5.0 with commit 63346650c1a9 and fixed in 5.13.6 with commit bc1660206c37 Issue introduced in 5.0 with commit 63346650c1a9 and fixed in 5.14 with commit 517a16b1a88b Issue introduced in 3.18.134 with commit f1d9a1f2ef6f Issue introduced in 4.20.7 with commit 519e8a22a454 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-47294 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: net/netrom/nr_timer.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/853262355518cd1247515b74e83fabf038aa6c29 https://git.kernel.org/stable/c/a01634bf91f2b6c42583770eb6815fb6d1e251cf https://git.kernel.org/stable/c/48866fd5c361ea417ed24b43fc2a7dc2f5b060ef https://git.kernel.org/stable/c/9619cc7d97c3aa8ed3cfd2b8678b74fb6d6c7950 https://git.kernel.org/stable/c/25df44e90ff5959b5c24ad361b648504a7e39ef3 https://git.kernel.org/stable/c/6811744bd0efb9e472cb15d066cdb460beb8cb8a https://git.kernel.org/stable/c/bc1660206c3723c37ed4d622ad81781f1e987250 https://git.kernel.org/stable/c/517a16b1a88bdb6b530f48d5d153478b2552d9a8