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 2D7BD823DE for ; Tue, 19 Nov 2024 01:33:44 +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=1731980024; cv=none; b=RUuRxJdz6buw+oVfNboGuskz5QvkAqhsLZceTKyIEzyAd3ZnjmRj8iB6ox5ZU/1G/zH42e9gV3JaII8k8//4BIpSwHy1X5/ZaYj2vUDneC9B9zHTiDwZEA4p6+4G6gV5BbImWvFpNFVV0kMYcPkIMyqGryX2L9mLPK430KpCgwQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731980024; c=relaxed/simple; bh=qDu86lPTDkwj9hwURIQv55kJn1wvojvc720JVHCsWM0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=sjITZLJG4qjKuITQwpN1XvAU6BXPO99ScEMbe0mFNAB5JWDk/9evAhQohX31HgjPO131ACPnza6tEkGXtkNbezpfvQe0BWbu/XzRotQXcCVqr/ZfnmBSGXb0nSe2QyqoslKjnTwdsuw8oFeALuRpgk9ZP5o5kGl6lAS+0yWN2H0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=rH9Ym5VI; 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="rH9Ym5VI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D9D3DC4CED6; Tue, 19 Nov 2024 01:33:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1731980024; bh=qDu86lPTDkwj9hwURIQv55kJn1wvojvc720JVHCsWM0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=rH9Ym5VItGwAHIdRAWVwiOLP79oRvM5PgRrMi+6yik4nee7xK2QM31Yqx1fLAWoQF eMQC4YbEXf7XbAezZ0bszQ3FYfT1tephW3Wgcil+xQNv/uTZd0AclORGGVRgbAviJI tZtIYz4OMkcRPA4PDU7Rl2yD+YkcwZ+tt+LQvx7U= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50271: signal: restore the override_rlimit logic Date: Tue, 19 Nov 2024 02:32:26 +0100 Message-ID: <2024111929-CVE-2024-50271-9089@gregkh> X-Mailer: git-send-email 2.47.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=3042; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=qDu86lPTDkwj9hwURIQv55kJn1wvojvc720JVHCsWM0=; b=owGbwMvMwCRo6H6F97bub03G02pJDOnWr9Zmrd2/5kbdx4Vnb7WZGyXf/idsF6j84uORQ8srK y+Yl0oEdMSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEivsY5ge1TW5eHJxtOHWd 2pIbRdeu1J7YysEwv+DbxH8Fnw73qIty6vovF+0wdD1rDgA= 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: signal: restore the override_rlimit logic Prior to commit d64696905554 ("Reimplement RLIMIT_SIGPENDING on top of ucounts") UCOUNT_RLIMIT_SIGPENDING rlimit was not enforced for a class of signals. However now it's enforced unconditionally, even if override_rlimit is set. This behavior change caused production issues. For example, if the limit is reached and a process receives a SIGSEGV signal, sigqueue_alloc fails to allocate the necessary resources for the signal delivery, preventing the signal from being delivered with siginfo. This prevents the process from correctly identifying the fault address and handling the error. From the user-space perspective, applications are unaware that the limit has been reached and that the siginfo is effectively 'corrupted'. This can lead to unpredictable behavior and crashes, as we observed with java applications. Fix this by passing override_rlimit into inc_rlimit_get_ucounts() and skip the comparison to max there if override_rlimit is set. This effectively restores the old behavior. The Linux kernel CVE team has assigned CVE-2024-50271 to this issue. Affected and fixed versions =========================== Issue introduced in 5.14 with commit d64696905554 and fixed in 6.1.117 with commit 012f4d5d25e9 Issue introduced in 5.14 with commit d64696905554 and fixed in 6.6.61 with commit 4877d9b2a2eb Issue introduced in 5.14 with commit d64696905554 and fixed in 6.11.8 with commit 0208ea17a1e4 Issue introduced in 5.14 with commit d64696905554 and fixed in 6.12 with commit 9e05e5c7ee87 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-50271 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: include/linux/user_namespace.h kernel/signal.c kernel/ucount.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/012f4d5d25e9ef92ee129bd5aa7aa60f692681e1 https://git.kernel.org/stable/c/4877d9b2a2ebad3ae240127aaa4cb8258b145cf7 https://git.kernel.org/stable/c/0208ea17a1e4456fbfe555f13ae5c28f3d671e40 https://git.kernel.org/stable/c/9e05e5c7ee8758141d2db7e8fea2cab34500c6ed