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 1313E29CE1 for ; Mon, 8 Dec 2025 00:47:36 +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=1765154857; cv=none; b=jFIgzBcp0X6ubTvG5mOfPYx6b5yZ9pVm0iyrhwPu+1BE/xwgQCe8CnvBRDtHn+2Z4xJJHPo8Ts1LyzQ4yuU017Of0Rt2cxebfHzFt2kg9qu7YcpY1eCOb+Z1r533p7zjAoK+412rakU8IyWxq42vau+dD390WQYZaXfXa7M0Ix0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765154857; c=relaxed/simple; bh=azgM5xJJxPlIV++wfuKVeTT4VKbCfJrT0Q3836PuvIY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=XkHNQukO+bumk/AH2aqbjTvnAFUeY5nYxGuPKCEUG0TPCQoxWFfaGq/h/R+utnjhKVJFfR9upbLJ6OSZs2OgBvkXR6gEvuTYNFcgZkmxEE3t7d9vngfmJoWPeTLXjRkmNenh7a9sRXxrAe8wBLus0dwLJhNYkwL27g+tqpkghYM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=cLpR85MU; 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="cLpR85MU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C8C2C4CEFB; Mon, 8 Dec 2025 00:47:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765154856; bh=azgM5xJJxPlIV++wfuKVeTT4VKbCfJrT0Q3836PuvIY=; h=From:To:Cc:Subject:Date:Reply-To:From; b=cLpR85MUTbgf164vqbh3fDm81WOBVF9DusuPS1Cb2cjRbpu1dXdS+q1IrrMarZ0Ah ZRT4oDwWyx5kZIOsO2bkoLn0IxYj2bSiK5SI9dl6RbmSjLWXqxwvuc0ShJ+0ndNXQ4 9HO7B7IFVtrK0MwINqcoQN2VAqBYQXlVA502lAtE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40302: media: videobuf2: forbid remove_bufs when legacy fileio is active Date: Mon, 8 Dec 2025 09:47:26 +0900 Message-ID: <2025120819-CVE-2025-40302-84e9@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=2282; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=DXN5eYD0zkJCG7ul1NNLQ047H2mrZdvLi4ImB0QApUE=; b=owGbwMvMwCRo6H6F97bub03G02pJDJlmCuIJr87NnxzSc26ppne8yv83or6aNWfMgn8k531tV ZG8udmtI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACay6i7D/JT1bbwbVP+9Y+W3 ezdBgbHheseG/wyz2QW+pZ149Wa7QMj0vVvTkg2ULt66AgA= 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: media: videobuf2: forbid remove_bufs when legacy fileio is active vb2_ioctl_remove_bufs() call manipulates queue internal buffer list, potentially overwriting some pointers used by the legacy fileio access mode. Forbid that ioctl when fileio is active to protect internal queue state between subsequent read/write calls. The Linux kernel CVE team has assigned CVE-2025-40302 to this issue. Affected and fixed versions =========================== Issue introduced in 6.10 with commit a3293a85381ec9680aa2929547fbc76c5d87a1b2 and fixed in 6.12.58 with commit a6a493b985bfffac097a4e1be09f98b27729dca8 Issue introduced in 6.10 with commit a3293a85381ec9680aa2929547fbc76c5d87a1b2 and fixed in 6.17.8 with commit e819b34df0a7030a15c968d619fa8a3ed2455c7a Issue introduced in 6.10 with commit a3293a85381ec9680aa2929547fbc76c5d87a1b2 and fixed in 6.18 with commit 27afd6e066cfd80ddbe22a4a11b99174ac89cced 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-40302 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/media/common/videobuf2/videobuf2-v4l2.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/a6a493b985bfffac097a4e1be09f98b27729dca8 https://git.kernel.org/stable/c/e819b34df0a7030a15c968d619fa8a3ed2455c7a https://git.kernel.org/stable/c/27afd6e066cfd80ddbe22a4a11b99174ac89cced