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 24A1627FB34 for ; Thu, 4 Dec 2025 16:08:11 +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=1764864493; cv=none; b=tqsPwDDa9V3h4WxrvD+dulxCfp1d6lgr05pHTXKweGzln3/1yj0xx4WUIPqNnOuYC2C4wiMxvUVWFg6E0oP09cx9Wl4/FUHZEdW8KSM31s+WhJ+zhU47JSgW2leDqPM3pINBCUjRr3o/y5Vf+hE5jwkRnKFuvmqcRF1N34sXJ2w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764864493; c=relaxed/simple; bh=5aSTekdBDl+RF07fHLn8MQAeAkOdqQa3o9S+sKqYkEY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=eYoNWygC0dr4Umd09aXOwlutHDMgovTZblkJrNxVkDIl67DIDmjf57LYPVTuCSWob204w2t6MXDW7S0MAct/F6llxWj0G3cn4kNXSLP2gRzzL/RpIAtFhEDdSnKMFjjKxEmeDvMxOo711iJKj/QVxNTHY0JHvmyr6C2pt/I06dE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=iUDXHCCS; 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="iUDXHCCS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7985DC4CEFB; Thu, 4 Dec 2025 16:08:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1764864491; bh=5aSTekdBDl+RF07fHLn8MQAeAkOdqQa3o9S+sKqYkEY=; h=From:To:Cc:Subject:Date:Reply-To:From; b=iUDXHCCSpkDyHayCLO07HC7Hmwb6tXbMfvTdARlaDh7lQ30Am6I84iEoZkZ1Aq37a aTvsOzjrSHnkjVFtxUllnasZ3dycxWQf9H1wSK5MhZiZPDBfr0uewZh4jBOg6gYcTp Aewn7t8FlqrSX/MeSxfUYCRnAcOqJfgh/i5IgwSg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40259: scsi: sg: Do not sleep in atomic context Date: Thu, 4 Dec 2025 16:57:40 +0100 Message-ID: <2025120433-CVE-2025-40259-86e9@gregkh> X-Mailer: git-send-email 2.52.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=2999; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=lmIUmEeJfkQ579d4HGLgbacsLmAN/Q9dYXjO6oiEnSw=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmG63Nn7m5aYbgk/sqxp0H/RE7/2qK9LNT7urBTa3Pjq WVp8eXbOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiuvIMC9Y5bJRuDXWd8G9b Qe1R1ifxNrNqJzLMd5kyg3d1XW8Q24Gu4zfOqs1ZJ/ymGAA= 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: scsi: sg: Do not sleep in atomic context sg_finish_rem_req() calls blk_rq_unmap_user(). The latter function may sleep. Hence, call sg_finish_rem_req() with interrupts enabled instead of disabled. The Linux kernel CVE team has assigned CVE-2025-40259 to this issue. Affected and fixed versions =========================== Issue introduced in 4.12 with commit 97d27b0dd015e980ade63fda111fd1353276e28b and fixed in 5.4.302 with commit 11eeee00c94d770d4e45364060b5f1526dfe567b Issue introduced in 4.12 with commit 97d27b0dd015e980ade63fda111fd1353276e28b and fixed in 6.6.118 with commit b343cee5df7e750d9033fba33e96fc4399fa88a5 Issue introduced in 4.12 with commit 97d27b0dd015e980ade63fda111fd1353276e28b and fixed in 6.12.60 with commit b2c0340cfa25c5c1f65e8590cc1a2dc97d14ef0f Issue introduced in 4.12 with commit 97d27b0dd015e980ade63fda111fd1353276e28b and fixed in 6.17.10 with commit 6983d8375c040bb449d2187f4a57a20de01244fe Issue introduced in 4.12 with commit 97d27b0dd015e980ade63fda111fd1353276e28b and fixed in 6.18 with commit 90449f2d1e1f020835cba5417234636937dd657e Issue introduced in 3.16.85 with commit 8d1f3b474a89b42f957ba3bae959dd3cd16531ca Issue introduced in 3.18.101 with commit fa55ef3f803fc7c20be0ab809e6278c31febd875 Issue introduced in 4.1.52 with commit 6af37613289cfd32516ada47e444b48a638829c8 Issue introduced in 4.4.123 with commit 4a8e8e0af9a520a685e0ab2d489327d5220d7ce2 Issue introduced in 4.9.89 with commit ae9b6ae2e77947534e255903627cc62746ea77e2 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-40259 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/scsi/sg.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/11eeee00c94d770d4e45364060b5f1526dfe567b https://git.kernel.org/stable/c/b343cee5df7e750d9033fba33e96fc4399fa88a5 https://git.kernel.org/stable/c/b2c0340cfa25c5c1f65e8590cc1a2dc97d14ef0f https://git.kernel.org/stable/c/6983d8375c040bb449d2187f4a57a20de01244fe https://git.kernel.org/stable/c/90449f2d1e1f020835cba5417234636937dd657e