{"id":"CVE-2026-64124","summary":"net: devmem: reject dma-buf bind with non-page-aligned size or SG length","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: devmem: reject dma-buf bind with non-page-aligned size or SG length\n\nnet_devmem_bind_dmabuf() trusts dmabuf-\u003esize and sg_dma_len() to be\nPAGE_SIZE multiples without checking:\n\n  - tx_vec is sized dmabuf-\u003esize / PAGE_SIZE, and\n    net_devmem_get_niov_at() only bounds-checks virt_addr \u003c dmabuf-\u003esize\n    before indexing tx_vec[virt_addr / PAGE_SIZE]. With size =\n    N*PAGE_SIZE + r (1 \u003c= r \u003c PAGE_SIZE), sendmsg() at iov_base =\n    N*PAGE_SIZE passes the bound check and reads tx_vec[N] -- one past.\n\n  - owner-\u003earea.num_niovs = len / PAGE_SIZE while gen_pool_add_owner()\n    covers the full byte len, so a non-page-multiple non-final sg\n    desyncs num_niovs from the gen_pool region for every later sg, on\n    both RX and TX.\n\ndma-buf does not require page-aligned sizes, so the bind path has to\nenforce what its own indexing assumes. Reject both with -EINVAL.\n\nThe size check is TX-only (only tx_vec is sized off dmabuf-\u003esize); the\nSG-length check covers both directions.","modified":"2026-07-22T05:29:53.961067297Z","published":"2026-07-19T15:40:21.879Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64124.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/134c517dfa63203287b2aad6558017f42435a02e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4eb82ba543421e9e38cc14e4e82058b78850df50"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d5008e4e4ee6b739256b796702a7d1aae1b5c3b4"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64124.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-64124"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"bd61848900bff597764238f3a8ec67c815cd316e"},{"fixed":"134c517dfa63203287b2aad6558017f42435a02e"},{"fixed":"d5008e4e4ee6b739256b796702a7d1aae1b5c3b4"},{"fixed":"4eb82ba543421e9e38cc14e4e82058b78850df50"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64124.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.16.0"},{"fixed":"6.18.35"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.0.11"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64124.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H"}]}