{"id":"CVE-2026-143092","summary":"xen/gntdev: fix deadlock between map ioctl and mmap","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nxen/gntdev: fix deadlock between map ioctl and mmap\n\nCommit 45ca1afe2fd1 (\"xen/gntdev: fix error handling in ioctl\") moved\ncopy_to_user() in gntdev_ioctl_map_grant_ref() under priv-\u003elock. A\nfault in copy_to_user() takes mmap_lock, while gntdev_mmap() is called\nwith mmap_lock held and takes priv-\u003elock:\n\n  ioctl thread                        mmap thread\n  mutex_lock(&priv-\u003elock)\n                                      mmap_write_lock(mm)\n                                      gntdev_mmap()\n                                        mutex_lock(&priv-\u003elock)\n  copy_to_user() faults\n    mmap_read_lock(mm)\n\nReproduced on Debian 6.12.111 in a Xen guest, with the ioctl argument\non a MAP_PRIVATE file page that has not been written yet. sysrq-w:\n\n  task:repro state:D stack:0 pid:4479 tgid:4477 ppid:1 flags:0x00000000\n   rwsem_down_read_slowpath+0x25c/0x480\n   down_read_killable+0x48/0xc0\n   lock_mm_and_find_vma+0x96/0x250\n   do_user_addr_fault+0x12d/0x620\n   exc_page_fault+0x7e/0x180\n   asm_exc_page_fault+0x26/0x30\n   _copy_to_user+0x36/0x50\n   gntdev_ioctl+0x3b9/0xa00 [xen_gntdev]\n   __x64_sys_ioctl+0x97/0xc0\n  task:repro state:D stack:0 pid:4480 tgid:4477 ppid:1 flags:0x00000000\n   __mutex_lock.constprop.0+0x41b/0x720\n   gntdev_mmap+0x4d/0x330 [xen_gntdev]\n   __mmap_region+0x697/0xb10\n   mmap_region+0x78/0xa0\n   do_mmap+0x45d/0x630\n   vm_mmap_pgoff+0xf8/0x1c0\n\nDrop priv-\u003elock before copy_to_user() again. On failure, re-take it\nand remove the map by index, as IOCTL_GNTDEV_UNMAP_GRANT_REF does,\nsince another thread may have unmapped it meanwhile.","modified":"2026-12-03T11:01:15.400398410Z","published":"2026-12-03T09:19:14.121Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143092.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4a872dabc1ee3a4d1085ecad2c42211b3ebcf88a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/59b664d7553390a0ca5b7d78cfdb89086eec4933"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7620a997e4854c94eacebf0c2d453fbd78ccdb46"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7b73a22b4a3055f96877c609d253711de32e106a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/813fe8ddcb0847db3dde8b8821550235418df272"},{"type":"WEB","url":"https://git.kernel.org/stable/c/df42e7afdb02f2adea17a6e2732502481bda73f5"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143092.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-143092"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"52dc40ef0cfee6ae89b7524967e73f0ba37906d7"},{"fixed":"4a872dabc1ee3a4d1085ecad2c42211b3ebcf88a"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"1dd9cb98fe228e017fff9efb33862ff38c741b65"},{"fixed":"813fe8ddcb0847db3dde8b8821550235418df272"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"18a693733f7ad004e1ab0466693121ca70cd95dd"},{"fixed":"df42e7afdb02f2adea17a6e2732502481bda73f5"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"16d3ccdabb8dee9be2cdcd6d3f9a125572ec0454"},{"fixed":"59b664d7553390a0ca5b7d78cfdb89086eec4933"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"45ca1afe2fd14c04e37227e79d3f8455831d8408"},{"fixed":"7b73a22b4a3055f96877c609d253711de32e106a"},{"fixed":"7620a997e4854c94eacebf0c2d453fbd78ccdb46"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"6df926130aee6cab9b5d2e5b7862e49ccac348dc"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"311011f8cc206c5af2877b03e3f627ee1b8fe024"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"6883269a323609f68f6faa903f8f8ff3d191cec8"}]}],"versions":["v5.10.275","v5.10.274","v5.10.273","v5.10.272","v5.10.271","v5.10.270","v5.10.269","v5.10.268","v5.10.267","v5.10.266","v5.10.265","v5.10.264","v5.10.263","v5.10.262","v5.10.261","v5.15.226","v5.15.225","v5.15.224","v5.15.223","v5.15.222","v5.15.221","v5.15.220","v5.15.219","v5.15.218","v5.15.217","v5.15.216","v5.15.215","v5.15.214","v5.15.213","v5.15.212","v6.12.119","v6.12.118","v6.12.117","v6.12.116","v6.12.115","v6.12.114","v6.12.113","v6.12.112","v6.12.111","v6.12.110","v6.12.109","v6.12.108","v6.12.107","v6.12.106","v6.12.105","v6.12.104","v6.12.103","v6.12.102","v6.12.101","v6.12.100","v6.12.99","v6.12.98","v6.12.97","v6.18.65","v6.18.64","v6.18.63","v6.18.62","v6.18.61","v6.18.60","v6.18.59","v6.18.58","v6.18.57","v6.18.56","v6.18.55","v6.18.54","v6.18.53","v6.18.52","v6.18.51","v6.18.50","v6.18.49","v6.18.48","v6.18.47","v6.18.46","v6.18.45","v6.18.44","v6.18.43","v6.18.42","v6.18.41","v6.18.40","v6.1.193","v6.1.192","v6.1.191","v6.1.190","v6.1.189","v6.1.188","v6.1.187","v6.1.186","v6.1.185","v6.1.184","v6.1.183","v6.1.182","v6.1.181","v6.1.180","v6.1.179","v6.1.178","v6.6.163","v6.6.162","v6.6.161","v6.6.160","v6.6.159","v6.6.158","v6.6.157","v6.6.156","v6.6.155","v6.6.154","v6.6.153","v6.6.152","v6.6.151","v6.6.150","v6.6.149","v6.6.148","v6.6.147","v6.6.146","v6.6.145","v7.1.13","v7.1.12","v7.1.11","v7.1.10","v7.1.9","v7.1.8","v7.1.7","v7.1.6","v7.1.5"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-143092.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.10.261"},{"fixed":"5.10.276"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.15.212"},{"fixed":"5.15.227"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.1.178"},{"fixed":"6.2"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.6.145"},{"fixed":"6.7"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.12.97"},{"fixed":"6.12.120"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.18.40"},{"fixed":"6.18.66"}]},{"type":"ECOSYSTEM","events":[{"introduced":"7.1.5"},{"fixed":"7.2"}]},{"type":"ECOSYSTEM","events":[{"introduced":"7.2.0"},{"fixed":"7.3.7"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-143092.json"}}],"schema_version":"1.9.2"}