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 44D073D75D7 for ; Wed, 27 May 2026 12:19:57 +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=1779884401; cv=none; b=QvX+RvmiFzk9QTHsf564xo0d+Lop/SNyKZkmqBBvUI3EXsbLscFrLMIyYp4tfax0VBONwJSx5mbgwVs2vcUC2UVoNYN2U1o0c/5q42sABnXy6k+DZU9dhlWPg6amPBDRlZknPZjFSqFq3gc3eQmpcT+6VZidE4M4M7aZtKfmwOc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779884401; c=relaxed/simple; bh=95f4IuuZgWBsF9hxZdfmjsUZbxd/Z1pfxI4cmnnpg+M=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=NcQ/kceCBt/86b+7lI11jNEKsx20DDflMMaXXex36UKjwfxdVf8xwtDXBuCegNk4wXrqL+qnYLY0I/pOnDeqXY/S6eSTonfE0rb8dy7++i9wBN2ISkXnBHkGM2JASrUieV+lz4vFH20IF10D5+yXTwrONZyg0+y+2i5wv7H5z58= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=fe2/FOOS; 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="fe2/FOOS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 120571F00A3A; Wed, 27 May 2026 12:19:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779884397; bh=S1Plg77lyQVZUMGrvNpEPoLC5BK5omt+SgJyk/d9UqI=; h=From:To:Cc:Subject:Date:Reply-To; b=fe2/FOOS/iXfcSvLTm6LSI/zzqcUDULBfZmovA8J+pEbGRq9LGV2lpARawmrzq4VG PjT7KAGf88nuYkwyYvYCzEPqBb1Z6Zbe4xzrxD0pk8Z0yHV4Ih+xv0Zrvph7DIUWpX RQQChEvMTcf51QZgHSfSx4dIZgdr1oaP/sWc8lsE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-71306: ima: Fix stack-out-of-bounds in is_bprm_creds_for_exec() Date: Wed, 27 May 2026 14:18:05 +0200 Message-ID: <2026052706-CVE-2025-71306-f80c@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=2679; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=R15twhIcP9twHYgtOr5bWodGThrjNwKeSULnY1ik6VQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDFliD/5pXnY8Pcf0mcyW7xc2cDXXH+84dct1Q6DkG1Hrp 0If97hVdMSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBENNsZFizfEhr+Jj2K/0Bt /JpTG2ZIJS3T4mKYZ/w6mSXr2WNnjWyhbynPhQ0ZJE8KAQA= 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: ima: Fix stack-out-of-bounds in is_bprm_creds_for_exec() KASAN reported a stack-out-of-bounds access in ima_appraise_measurement from is_bprm_creds_for_exec: BUG: KASAN: stack-out-of-bounds in ima_appraise_measurement+0x12dc/0x16a0 Read of size 1 at addr ffffc9000160f940 by task sudo/550 The buggy address belongs to stack of task sudo/550 and is located at offset 24 in frame: ima_appraise_measurement+0x0/0x16a0 This frame has 2 objects: [48, 56) 'file' [80, 148) 'hash' This is caused by using container_of on the *file pointer. This offset calculation is what triggers the stack-out-of-bounds error. In order to fix this, pass in a bprm_is_check boolean which can be set depending on how process_measurement is called. If the caller has a linux_binprm pointer and the function is BPRM_CHECK we can determine is_check and set it then. Otherwise set it to false. The Linux kernel CVE team has assigned CVE-2025-71306 to this issue. Affected and fixed versions =========================== Issue introduced in 6.14 with commit 95b3cdafd7cb74414070893445a9b731793f7b55 and fixed in 6.19.4 with commit ab3d16da982a4ebb715d487dbf9dd66e3990d935 Issue introduced in 6.14 with commit 95b3cdafd7cb74414070893445a9b731793f7b55 and fixed in 7.0 with commit 377cae9851e8559e9d8b82a78c1ac0abeb18839c 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-2025-71306 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: security/integrity/ima/ima.h security/integrity/ima/ima_appraise.c security/integrity/ima/ima_main.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/ab3d16da982a4ebb715d487dbf9dd66e3990d935 https://git.kernel.org/stable/c/377cae9851e8559e9d8b82a78c1ac0abeb18839c