{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-31617","id":"CVE-2026-31617","title":"usb: gadget: f_ncm: validate minimum block_len in ncm_unwrap_ntb()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: f_ncm: validate minimum block_len in ncm_unwrap_ntb()\n\nThe block_len read from the host-supplied NTB header is checked against\nntb_max but has no lower bound. When block_len is smaller than\nopts->ndp_size, the bounds check of:\n\tndp_index > (block_len - opts->ndp_size)\nwill underflow producing a huge unsigned value th","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: f_ncm: validate minimum block_len in ncm_unwrap_ntb()\n\nThe block_len read from the host-supplied NTB header is checked against\nntb_max but has no lower bound. When block_len is smaller than\nopts->ndp_size, the bounds check of:\n\tndp_index > (block_len - opts->ndp_size)\nwill underflow producing a huge unsigned value that ndp_index can never\nexceed, defeating the check entirely.\n\nThe same underflow occurs in the datagram index checks against block_len\n- opts->dpe_size.  With those checks neutered, a malicious USB host can\nchoose ndp_index and datagram offsets that point past the actual\ntransfer, and the skb_put_data() copies adjacent kernel memory into the\nnetwork skb.\n\nFix this by rejecting block lengths that cannot hold at least the NTB\nheader plus one NDP.  This will make block_len - opts->ndp_size and\nblock_len - opts->dpe_size both well-defined.\n\nCommit 8d2b1a1ec9f5 (\"CDC-NCM: avoid overflow in sanity checking\") fixed\na related class of issues on the host side of NCM.","published":"2026-04-24T14:42:36.191Z","updated":"2026-11-17T07:03:24.151822332Z","reserved":"2026-03-09T15:48:24.123Z","status":"Modified","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"0b0ca135-0b70-47e7-9f44-1890c2a1c46c"},"metrics":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"0b0ca135-0b70-47e7-9f44-1890c2a1c46c"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"redhat-SADP"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"OSV"}],"rating":"medium","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"2b74b0a04d3e9f9f08ff026e5663dce88ff94e52","lessThan":"068a7f2749fff6462a0a908ec415b885fe430f50","status":"affected","versionType":"git"},{"version":"2b74b0a04d3e9f9f08ff026e5663dce88ff94e52","lessThan":"1425655c2870054c3ab4712e2b6dbdd331597ada","status":"affected","versionType":"git"},{"version":"2b74b0a04d3e9f9f08ff026e5663dce88ff94e52","lessThan":"8b3b7bd3c02f98634baaf36c7fc7ac915f6517ca","status":"affected","versionType":"git"},{"version":"2b74b0a04d3e9f9f08ff026e5663dce88ff94e52","lessThan":"0f156bb5334e588034ca68ac2ee92b23f66e56e7","status":"affected","versionType":"git"},{"version":"2b74b0a04d3e9f9f08ff026e5663dce88ff94e52","lessThan":"8757a2593631443648218244b9788e193ae0fdc1","status":"affected","versionType":"git"},{"version":"2b74b0a04d3e9f9f08ff026e5663dce88ff94e52","lessThan":"6762f8a95772265dd0c2ffe7f400493f3115b135","status":"affected","versionType":"git"},{"version":"2b74b0a04d3e9f9f08ff026e5663dce88ff94e52","lessThan":"d58ba8f6546232f8414f396c189297dbee03f1a7","status":"affected","versionType":"git"},{"version":"2b74b0a04d3e9f9f08ff026e5663dce88ff94e52","lessThan":"74908b0318d1df1188457040b8714ff4d4b68126","status":"affected","versionType":"git"},{"version":"2b74b0a04d3e9f9f08ff026e5663dce88ff94e52","lessThan":"8f993d30b95dc9557a8a96ceca11abed674c8acb","status":"affected","versionType":"git"},{"version":"f7e0611e207d8908c4f2858e244370529a76dbf7","status":"affected","versionType":"git"},{"version":"b88ad6e714284b33a47834f5f2a294c2b37c66aa","status":"affected","versionType":"git"},{"version":"471b23586387a32857778c511be60ab31c98dcfd","status":"affected","versionType":"git"},{"version":"4f529c4d1e436230d3af7c09a3239677a14d2b46","status":"affected","versionType":"git"},{"version":"ae6a5394d9fbe118bc95cfe376d6a9d91d7547e8","status":"affected","versionType":"git"},{"version":"4.9.235","lessThan":"4.10","status":"affected","versionType":"semver"},{"version":"4.14.196","lessThan":"4.15","status":"affected","versionType":"semver"},{"version":"4.19.143","lessThan":"4.20","status":"affected","versionType":"semver"},{"version":"5.4.62","lessThan":"5.5","status":"affected","versionType":"semver"},{"version":"5.8.6","lessThan":"5.9","status":"affected","versionType":"semver"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.9","status":"affected"},{"version":"0","lessThan":"5.9","status":"unaffected","versionType":"semver"},{"version":"5.10.258","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.209","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.175","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.136","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.83","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.18.24","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"6.19.14","lessThanOrEqual":"6.19.*","status":"unaffected","versionType":"semver"},{"version":"7.0.1","lessThanOrEqual":"7.0.*","status":"unaffected","versionType":"semver"},{"version":"7.1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-191"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/068a7f2749fff6462a0a908ec415b885fe430f50","tags":["web"]},{"url":"https://git.kernel.org/stable/c/1425655c2870054c3ab4712e2b6dbdd331597ada","tags":["web"]},{"url":"https://git.kernel.org/stable/c/8b3b7bd3c02f98634baaf36c7fc7ac915f6517ca","tags":["web"]},{"url":"https://git.kernel.org/stable/c/0f156bb5334e588034ca68ac2ee92b23f66e56e7","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/8757a2593631443648218244b9788e193ae0fdc1","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/6762f8a95772265dd0c2ffe7f400493f3115b135","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/d58ba8f6546232f8414f396c189297dbee03f1a7","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/74908b0318d1df1188457040b8714ff4d4b68126","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/8f993d30b95dc9557a8a96ceca11abed674c8acb","tags":["Patch","web"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-31617","tags":["vdb-entry","x_refsource_REDHAT","advisory"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2461448","tags":["issue-tracking","x_refsource_REDHAT","report"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31617.json","tags":["x_sadp-csaf-vex","web"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-784472.html","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31617.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31617","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.00134,"epssPercentile":0.02955,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-31617","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31617","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-31617","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-31617","ok":true,"note":"scored 2026-11-20"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}