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 DFCA41465B3 for ; Sat, 17 Aug 2024 09:12:46 +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=1723885967; cv=none; b=G/8xMH9kXZXm11+h/HyXhbskNecIhdSRdrBhvdShrWssUgJfzkZQ4H6OuqZOwAmwbs5E6bS62LwMqyJs1P/cea7BEpqcIlXQQ7XbpoFMyoCw+Ww3tsC3H9Su4mwhonZ4YUIeU1WD73r89XlkswkVr3Oq1j4s93NEL6SRh69t4Fw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723885967; c=relaxed/simple; bh=4u0r1GOeoiF+yl1r9bDyrReAtSYkSEDRcMcPD4g5Ptw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=SKpygjfj5TMtjzGLkcteC2swPOulLU4YotTEYPwOFLs6uGmUb5BXDCgG0WPHqZobbBqLhDYgFsa+Dqe7/9XU3IuBccnYkdfm9YAJcWpEcfQWyIWPqXSCITHST5+JnY6z2bhGd6prewbDQ/mD9w/aXmliInqMctG50tI7oremnT4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=qlKzpwrd; 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="qlKzpwrd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 607A1C4AF0C; Sat, 17 Aug 2024 09:12:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1723885966; bh=4u0r1GOeoiF+yl1r9bDyrReAtSYkSEDRcMcPD4g5Ptw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=qlKzpwrdLVF+IYKSOydyrlz9V8w6df8L5C1vGNnOs2oz9ADUHDyzxGpjvkltJ/igB CCRY5hib8nAqHKLl0jeOglH1NTGq5WDlPy3VTrSfz8pnCIPOFgNWnnAm9vW4xnz8Yf QoIzVQ/28ec8naCfmWPcZEnndq52HBth/9ioBIXk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-42312: sysctl: always initialize i_uid/i_gid Date: Sat, 17 Aug 2024 11:10:17 +0200 Message-ID: <2024081752-CVE-2024-42312-bddc@gregkh> X-Mailer: git-send-email 2.46.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=2665; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=4u0r1GOeoiF+yl1r9bDyrReAtSYkSEDRcMcPD4g5Ptw=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkHMh6wPYtauiGrM3cN78vp109LKB+Y+vFxee+mlAPHD rnZ7GQ+3hHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQAT4a5mmCs0Wbh4v++Tudft YuI2vtxmYuWTyM+wYPGqy/ePr/fs+dv25q+TurOxVV18HAA= 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: sysctl: always initialize i_uid/i_gid Always initialize i_uid/i_gid inside the sysfs core so set_ownership() can safely skip setting them. Commit 5ec27ec735ba ("fs/proc/proc_sysctl.c: fix the default values of i_uid/i_gid on /proc/sys inodes.") added defaults for i_uid/i_gid when set_ownership() was not implemented. It also missed adjusting net_ctl_set_ownership() to use the same default values in case the computation of a better value failed. The Linux kernel CVE team has assigned CVE-2024-42312 to this issue. Affected and fixed versions =========================== Issue introduced in 5.3 with commit 5ec27ec735ba and fixed in 6.1.104 with commit 1deae34db9f4 Issue introduced in 5.3 with commit 5ec27ec735ba and fixed in 6.6.45 with commit ffde3af4b29b Issue introduced in 5.3 with commit 5ec27ec735ba and fixed in 6.10.3 with commit c7e2f43d182f Issue introduced in 5.3 with commit 5ec27ec735ba and fixed in 6.11-rc1 with commit 98ca62ba9e2b Issue introduced in 4.9.187 with commit e83234d7ef23 Issue introduced in 4.14.135 with commit 2cbf2af144f0 Issue introduced in 4.19.61 with commit 2c7b50c7b1d0 Issue introduced in 5.1.20 with commit 7eb45a94c279 Issue introduced in 5.2.3 with commit 14cc90952cef 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-42312 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: fs/proc/proc_sysctl.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/1deae34db9f4f8e0e03f891be2e2e15c15c8ac05 https://git.kernel.org/stable/c/ffde3af4b29bf97d62d82e1d45275587e10a991a https://git.kernel.org/stable/c/c7e2f43d182f5dde473389dbb39f16c9f0d64536 https://git.kernel.org/stable/c/98ca62ba9e2be5863c7d069f84f7166b45a5b2f4