{"id":"DEBIAN-CVE-2024-26996","details":"In the Linux kernel, the following vulnerability has been resolved:  usb: gadget: f_ncm: Fix UAF ncm object at re-bind after usb ep transport error  When ncm function is working and then stop usb0 interface for link down, eth_stop() is called. At this piont, accidentally if usb transport error should happen in usb_ep_enable(), 'in_ep' and/or 'out_ep' may not be enabled.  After that, ncm_disable() is called to disable for ncm unbind but gether_disconnect() is never called since 'in_ep' is not enabled.  As the result, ncm object is released in ncm unbind but 'dev-\u003eport_usb' associated to 'ncm-\u003eport' is not NULL.  And when ncm bind again to recover netdev, ncm object is reallocated but usb0 interface is already associated to previous released ncm object.  Therefore, once usb0 interface is up and eth_start_xmit() is called, released ncm object is dereferrenced and it might cause use-after-free memory.  [function unlink via configfs]   usb0: eth_stop dev-\u003eport_usb=ffffff9b179c3200   --\u003e error happens in usb_ep_enable().   NCM: ncm_disable: ncm=ffffff9b179c3200   --\u003e no gether_disconnect() since ncm-\u003eport.in_ep-\u003eenabled is false.   NCM: ncm_unbind: ncm unbind ncm=ffffff9b179c3200   NCM: ncm_free: ncm free ncm=ffffff9b179c3200   \u003c-- released ncm  [function link via configfs]   NCM: ncm_alloc: ncm alloc ncm=ffffff9ac4f8a000   NCM: ncm_bind: ncm bind ncm=ffffff9ac4f8a000   NCM: ncm_set_alt: ncm=ffffff9ac4f8a000 alt=0   usb0: eth_open dev-\u003eport_usb=ffffff9b179c3200  \u003c-- previous released ncm   usb0: eth_start dev-\u003eport_usb=ffffff9b179c3200 \u003c--   eth_start_xmit()   --\u003e dev-\u003ewrap()   Unable to handle kernel paging request at virtual address dead00000000014f  This patch addresses the issue by checking if 'ncm-\u003enetdev' is not NULL at ncm_disable() to call gether_disconnect() to deassociate 'dev-\u003eport_usb'. It's more reasonable to check 'ncm-\u003enetdev' to call gether_connect/disconnect rather than check 'ncm-\u003eport.in_ep-\u003eenabled' since it might not be enabled but the gether connection might be established.","modified":"2026-09-15T09:03:06.020088436Z","published":"2024-05-01T06:15:17.480Z","upstream":["CVE-2024-26996"],"references":[{"type":"ADVISORY","url":"https://security-tracker.debian.org/tracker/CVE-2024-26996"}],"affected":[{"package":{"name":"linux","ecosystem":"Debian:12","purl":"pkg:deb/debian/linux?arch=source&distro=bookworm"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.1.90-1"}]}],"versions":["6.1.27-1","6.1.37-1","6.1.38-1","6.1.38-2","6.1.38-2~bpo11+1","6.1.38-3","6.1.38-4","6.1.38-4~bpo11+1","6.1.52-1","6.1.55-1","6.1.55-1~bpo11+1","6.1.64-1","6.1.66-1","6.1.67-1","6.1.69-1","6.1.69-1~bpo11+1","6.1.76-1","6.1.76-1~bpo11+1","6.1.82-1","6.1.85-1","6.1.90-1~bpo11+1"],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2024-26996.json"}},{"package":{"name":"linux","ecosystem":"Debian:13","purl":"pkg:deb/debian/linux?arch=source&distro=trixie"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.8.9-1"}]}],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2024-26996.json"}},{"package":{"name":"linux","ecosystem":"Debian:14","purl":"pkg:deb/debian/linux?arch=source&distro=forky"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.8.9-1"}]}],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2024-26996.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}