From mboxrd@z Thu Jan 1 00:00:00 1970 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 833D626ED3C for ; Mon, 8 Jun 2026 15:51:05 +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=1780933866; cv=none; b=Eqre0aIbdPMpHx88sgM58afcP2nunr2hQ9FwQ5WR6jF3M+lUAeKoq1mNS4FzDkmaiVijmQ5C1qa11OLAV1QgYTjT6Y7gGhVzB6ITv+50qA5gCj0I+p3viJrFX258+lULLx9jMNrx+2gSb2cujoO2AI0M2h4fAFJHeXUsqdZ0NTU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780933866; c=relaxed/simple; bh=ZHHrSDQbflhS+LI7hMSae13/uVNyPchRp24N+u7A5/M=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=LFQXIphMJGZiBO1QYe4STdgVclUbV2qukmCdJ+x06gspauK64vOhKQQ8/H3Ldvay4oMT6JG3EA7Kf8ykbVqXF+nqBpcfbgWvDptpj6A90QYtlzIbO0z+roDdXC4w+FhhmbZIGznia8eh2UjelRVZC5jz/ddBIgcymci0+bPRskA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=cNGl0uJS; 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="cNGl0uJS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82A9F1F00893; Mon, 8 Jun 2026 15:51:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1780933865; bh=9pQNQnsMi7vf5QM7H0QniidZxqMRx/ThXRUlSQvzkUc=; h=From:To:Cc:Subject:Date:Reply-To; b=cNGl0uJSgVuATeHP6i63Y9eKLQ9KxOrIJ1CAyrI1yIlqibjPgWG4niTqGBiUSTqpk QBheW19/4gqTWDTRDOJoMkugaMmmM4IjutGqpl8+M7632nTXv/lV9M2QPPcKKlrRf5 OS+3YOjIBMpt/j+cec9OZVQOxN9SMDOIWlg4OIrw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-46312: media: videobuf2: Set vma_flags in vb2_dma_sg_mmap Date: Mon, 8 Jun 2026 17:49:56 +0200 Message-ID: <2026060853-CVE-2026-46312-a367@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=6732; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=sva8x3fKClFYP1dQKrwF5jJWT1Y128EmKiztpb5CUn0=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlqTxbGpsw/vz54ynxx2VwFs5Slc/YwxPhPSnIW5O9tq a96Fc7YEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABPZ/phhwb6Wfe4rDfh7uz++ Xvo9gv9Fb9F/E4YF+9eklZ9+s9+GqyjWkclJ4npfxc1sAA== 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: Set vma_flags in vb2_dma_sg_mmap vb2_dma_contig sets VMA flags VM_DONTEXPAND and VM_DONTDUMP and I do not see a reason why vb2_dma_sg should behave differently. This avoids hitting `WARN_ON(!(vma->vm_flags & VM_DONTEXPAND));` in drm_gem_mmap_obj() during mmap() of an imported dma-buf from the out of tree Apple ISP camera capture driver which uses vb2_dma_sg_memops. gst-launch-1.0 v4l2src ! gtk4paintablesink [ 38.201528] ------------[ cut here ]------------ [ 38.202135] WARNING: CPU: 7 PID: 2362 at drivers/gpu/drm/drm_gem.c:1144 drm_gem_mmap_obj+0x1f8/0x210 [ 38.203278] Modules linked in: rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device uinput nf_conntrack_netbios_ns nf_conntrack_broadcast nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables qrtr bnep nls_ascii i2c_dev loop fuse dm_multipath nfnetlink brcmfmac_wcc hid_magicmouse hci_bcm4377 brcmfmac brcmutil bluetooth ecdh_generic cfg80211 ecc btrfs xor xor_neon rfkill hid_apple raid6_pq joydev aop_als apple_nvmem_spmi industrialio snd_soc_aop apple_z2 snd_soc_cs42l84 tps6598x snd_soc_tas2764 macsmc_reboot spi_nor macsmc_hwmon rtc_macsmc gpio_macsmc macsmc_power regmap_spmi macsmc_input dockchannel_hid panel_summit appledrm nvme_apple dwc3 snd_soc_macaudio drm_client_lib nvme_core phy_apple_atc hwmon apple_sart apple_dockchannel macsmc apple_rtkit_helper spmi_apple_controller aop apple_wdt mfd_core nvmem_apple_efuses pinctrl_apple_gpio apple_isp apple_dcp videobuf2_dma_sg mux_core spi_apple [ 38.203300] videobuf2_memops i2c_pasemi_platform snd_soc_apple_mca videobuf2_v4l2 videodev clk_apple_nco videobuf2_common snd_pcm_dmaengine adpdrm asahi apple_admac adpdrm_mipi drm_dma_helper pwm_apple i2c_pasemi_core drm_display_helper mc cec apple_dart ofpart apple_soc_cpufreq leds_pwm phram [ 38.217677] CPU: 7 UID: 1000 PID: 2362 Comm: gst-launch-1.0 Tainted: G W 6.17.6+ #asahi-dev PREEMPT(full) [ 38.219040] Tainted: [W]=WARN [ 38.219398] Hardware name: Apple MacBook Pro (13-inch, M2, 2022) (DT) [ 38.220213] pstate: 21400005 (nzCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--) [ 38.221088] pc : drm_gem_mmap_obj+0x1f8/0x210 [ 38.221643] lr : drm_gem_mmap_obj+0x78/0x210 [ 38.222178] sp : ffffc0008dc678e0 [ 38.222579] x29: ffffc0008dc678e0 x28: 0000000000042a97 x27: ffff8000b701b480 [ 38.223465] x26: 00000000000000fb x25: ffffc0008dc67d20 x24: ffffc0008dc67968 [ 38.224402] x23: ffff8000e3ca5600 x22: ffff8000265b7800 x21: ffff80003000c0c0 [ 38.225279] x20: 0000000000000000 x19: ffff8000b68c5200 x18: ffffc0008dc67968 [ 38.226151] x17: 0000000000000000 x16: 0000000000000000 x15: ffffc000810a30a8 [ 38.227042] x14: 00007fff637effff x13: 00005555de91ffff x12: 00007fff63293fff [ 38.227942] x11: 0000000000000000 x10: ffff8000184ecf08 x9 : ffffc0007a1900c8 [ 38.228824] x8 : ffffc0008dc67968 x7 : 0000000000000012 x6 : ffffc0015cf1c000 [ 38.229703] x5 : ffffc0008dc676a0 x4 : ffffc00081a27dc0 x3 : 0000000000000038 [ 38.230607] x2 : 0000000000000003 x1 : 0000000000000003 x0 : 00000000100000fb [ 38.231488] Call trace: [ 38.231806] drm_gem_mmap_obj+0x1f8/0x210 (P) [ 38.232342] drm_gem_mmap+0x140/0x260 [ 38.232813] __mmap_region+0x488/0x9a0 [ 38.233277] mmap_region+0xd0/0x148 [ 38.233703] do_mmap+0x350/0x5c0 [ 38.234148] vm_mmap_pgoff+0x14c/0x200 [ 38.234612] ksys_mmap_pgoff+0x150/0x208 [ 38.235107] __arm64_sys_mmap+0x34/0x50 [ 38.235611] invoke_syscall+0x50/0x120 [ 38.236075] el0_svc_common.constprop.0+0x48/0xf0 [ 38.236680] do_el0_svc+0x24/0x38 [ 38.237113] el0_svc+0x38/0x168 [ 38.237507] el0t_64_sync_handler+0xa0/0xe8 [ 38.238034] el0t_64_sync+0x198/0x1a0 [ 38.238491] ---[ end trace 0000000000000000 ]--- There were discussions in [1] at the end of 2023 that mmap() on imported dma-bufs should not be supported but as of v6.17 drm_gem_shmem_mmap() in drm_gem_shmem_helper.c still supports it. This might affect all gpu or accel drivers using drm_gem_shmem_mmap() or the wrapper drm_gem_shmem_object_mmap(). [1] https://lore.kernel.org/dri-devel/bc7f7844-0aa3-4802-b203-69d58e8be2fa@linux.intel.com/ The Linux kernel CVE team has assigned CVE-2026-46312 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.39 with commit 5ba3f757f0592ca001266b4a6214d0332349909c and fixed in 6.6.140 with commit feb17524aa4ec337749344be0db52b88663e25ab Issue introduced in 2.6.39 with commit 5ba3f757f0592ca001266b4a6214d0332349909c and fixed in 6.12.90 with commit 1a1360264f699521e001e7739009ee3ee3c6a4f5 Issue introduced in 2.6.39 with commit 5ba3f757f0592ca001266b4a6214d0332349909c and fixed in 6.18.32 with commit 21fade52ab9fb13368a5709e60b0d9909197aeae Issue introduced in 2.6.39 with commit 5ba3f757f0592ca001266b4a6214d0332349909c and fixed in 7.0.9 with commit b4cf91658a636618f1437beec971dec25dec28eb Issue introduced in 2.6.39 with commit 5ba3f757f0592ca001266b4a6214d0332349909c and fixed in 7.1-rc1 with commit 7254b31a13aaa0c2c0f9ffbc335b718656117ff4 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-2026-46312 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-dma-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/feb17524aa4ec337749344be0db52b88663e25ab https://git.kernel.org/stable/c/1a1360264f699521e001e7739009ee3ee3c6a4f5 https://git.kernel.org/stable/c/21fade52ab9fb13368a5709e60b0d9909197aeae https://git.kernel.org/stable/c/b4cf91658a636618f1437beec971dec25dec28eb https://git.kernel.org/stable/c/7254b31a13aaa0c2c0f9ffbc335b718656117ff4