{"id":"CVE-2026-31727","aliases":["CVE-2026-31727"],"related":[],"kind":"vulnerability","state":"published","title":"usb: gadget: u_ether: Fix NULL pointer deref in eth_get_drvinfo","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: u_ether: Fix NULL pointer deref in eth_get_drvinfo\n\nCommit ec35c1969650 (\"usb: gadget: f_ncm: Fix net_device lifecycle with\ndevice_move\") reparents the gadget device to /sys/devices/virtual during\nunbind, clearing the gadget pointer. If the userspace tool queries on\nthe surviving interface during this detached window, this leads to a\nNULL pointer dereference.\n\nUnable to handle kernel NULL pointer dereference\nCall trace:\n eth_get_drvinfo+0x50/0x90\n ethtool_get_drvinfo+0x5c/0x1f0\n __dev_ethtool+0xaec/0x1fe0\n dev_ethtool+0x134/0x2e0\n dev_ioctl+0x338/0x560\n\nAdd a NULL check for dev->gadget in eth_get_drvinfo(). When detached,\nskip copying the fw_version and bus_info strings, which is natively\nhandled by ethtool_get_drvinfo for empty strings.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: u_ether: Fix NULL pointer deref in eth_get_drvinfo\n\nCommit ec35c1969650 (\"usb: gadget: f_ncm: Fix net_device lifecycle with\ndevice_move\") reparents the gadget device to /sys/devices/virtual during\nunbind, clearing the gadget pointer. If the userspace tool queries on\nthe surviving interface during this detached window, this leads to a\nNULL pointer dereference.\n\nUnable to handle kernel NULL pointer dereference\nCall trace:\n eth_get_drvinfo+0x50/0x90\n ethtool_get_drvinfo+0x5c/0x1f0\n __dev_ethtool+0xaec/0x1fe0\n dev_ethtool+0x134/0x2e0\n dev_ioctl+0x338/0x560\n\nAdd a NULL check for dev->gadget in eth_get_drvinfo(). When detached,\nskip copying the fw_version and bus_info strings, which is natively\nhandled by ethtool_get_drvinfo for empty strings.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nusb: gadget: u_ether: Corrige desreferencia de puntero NULL en eth_get_drvinfo\n\nEl commit ec35c1969650 (’usb: gadget: f_ncm: Corrige el ciclo de vida de net_device con device_move’) reparenta el dispositivo gadget a /sys/devices/virtual durante la desvinculación, borrando el puntero gadget. Si la herramienta de espacio de usuario consulta en la interfaz superviviente durante esta ventana de desconexión, esto lleva a una desreferencia de puntero NULL.\n\nNo se puede manejar la desreferencia de puntero NULL del kernel\nRastreo de llamadas:\n eth_get_drvinfo+0x50/0x90\n ethtool_get_drvinfo+0x5c/0x1f0\n __dev_ethtool+0xaec/0x 1fe0\n dev_ethtool+0x134/0x2e0\n dev_ioctl+0x338/0x560\n\nAñadir una comprobación de NULL para dev  ->  gadget en eth_get_drvinfo(). Cuando está desconectado, omitir la copia de las cadenas fw_version y bus_info, lo cual es manejado de forma nativa por ethtool_get_drvinfo para cadenas vacías.","source":"nvd"}],"published":"2026-05-01T14:14:27.552Z","modified":"2026-11-11T21:10:00.200Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-476"],"affected":[{"ranges":[{"type":"git","introduced":"7c97366f5dac5255e60a317ffe3a5b18f3745547","fixed":"f9f987472f4b8ab177be2b6492a59278ed969479","status":"affected"},{"type":"git","introduced":"36c41e9724c9a7a7cda37f5a4e9d94f25c8031c4","fixed":"7fce959e9be3bf63bb0fdf4b05f9cc42cb289fe2","status":"affected"},{"type":"git","introduced":"93f116c3393a22acab96ad1bef12b2572eb80ca4","fixed":"0326429e8ba99892e1d1e115dc8e88e1a3b64e24","status":"affected"},{"type":"git","introduced":"e584cb58a2ea7ff4d3a4bc43d5ca512ed3ecb77d","fixed":"a36e5e800b9c93e3e1ffa42f34d38b36775dbcee","status":"affected"},{"type":"git","introduced":"85acaba2f42b557499bab3608307f17bf13beb69","fixed":"7de4d46be40738c7e48e64b5cc0a34aa1e047b0a","status":"affected"},{"type":"git","introduced":"ec35c1969650e7cb6c8a91020e568ed46e3551b0","fixed":"e002e92e88e12457373ed096b18716d97e7bbb20","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"6.12.78","fixed":"6.12.81","status":"affected"},{"type":"semver","introduced":"6.18.19","fixed":"6.18.22","status":"affected"},{"type":"semver","introduced":"6.19.9","fixed":"6.19.12","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.12.78","fixed":"6.12.81"},{"status":"affected","introduced":"6.18.19","fixed":"6.18.22"},{"status":"affected","introduced":"6.19.9","fixed":"6.19.12"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/f9f987472f4b8ab177be2b6492a59278ed969479","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7fce959e9be3bf63bb0fdf4b05f9cc42cb289fe2","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0326429e8ba99892e1d1e115dc8e88e1a3b64e24","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a36e5e800b9c93e3e1ffa42f34d38b36775dbcee","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7de4d46be40738c7e48e64b5cc0a34aa1e047b0a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e002e92e88e12457373ed096b18716d97e7bbb20","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31727","url":"https://www.cve.org/CVERecord?id=CVE-2026-31727","licence":"CVE Terms of Use","modified":"2026-06-19T11:58:05.053Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31727","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31727","licence":"Public domain","modified":"2026-11-11T21:10:00.200Z"}],"updatedAt":"2026-11-25T22:59:20.354Z","epss":{"score":0.00127,"percentile":0.02589,"date":"2026-12-01T12:00:22.000Z"}}