{"id":"CVE-2026-31583","aliases":["CVE-2026-31583"],"related":[],"kind":"vulnerability","state":"published","title":"media: em28xx: fix use-after-free in em28xx_v4l2_open()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: em28xx: fix use-after-free in em28xx_v4l2_open()\n\nem28xx_v4l2_open() reads dev->v4l2 without holding dev->lock,\ncreating a race with em28xx_v4l2_init()'s error path and\nem28xx_v4l2_fini(), both of which free the em28xx_v4l2 struct\nand set dev->v4l2 to NULL under dev->lock.\n\nThis race leads to two issues:\n - use-after-free in v4l2_fh_init() when accessing vdev->ctrl_handler,\n   since the video_device is embedded in the freed em28xx_v4l2 struct.\n - NULL pointer dereference in em28xx_resolution_set() when accessing\n   v4l2->norm, since dev->v4l2 has been set to NULL.\n\nFix this by moving the mutex_lock() before the dev->v4l2 read and\nadding a NULL check for dev->v4l2 under the lock.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: em28xx: fix use-after-free in em28xx_v4l2_open()\n\nem28xx_v4l2_open() reads dev->v4l2 without holding dev->lock,\ncreating a race with em28xx_v4l2_init()'s error path and\nem28xx_v4l2_fini(), both of which free the em28xx_v4l2 struct\nand set dev->v4l2 to NULL under dev->lock.\n\nThis race leads to two issues:\n - use-after-free in v4l2_fh_init() when accessing vdev->ctrl_handler,\n   since the video_device is embedded in the freed em28xx_v4l2 struct.\n - NULL pointer dereference in em28xx_resolution_set() when accessing\n   v4l2->norm, since dev->v4l2 has been set to NULL.\n\nFix this by moving the mutex_lock() before the dev->v4l2 read and\nadding a NULL check for dev->v4l2 under the lock.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: media: em28xx: corregir uso después de liberación en em28xx_v4l2_open() em28xx_v4l2_open() lee dev-mayor que v4l2 sin mantener dev  ->  lock, creando una condición de carrera con la ruta de error de em28xx_v4l2_init() y em28xx_v4l2_fini(), ambos de los cuales liberan la estructura em28xx_v4l2 y establecen dev-mayor que v4l2 a NULL bajo dev  ->  lock. Esta condición de carrera conduce a dos problemas:\n- uso después de liberación en v4l2_fh_init() al acceder a vdev  ->  ctrl_handler, ya que el video_device está incrustado en la estructura em28xx_v4l2 liberada.\n- desreferencia de puntero NULL en em28xx_resolution_set() al acceder a v4l2  ->  norm, ya que dev-mayor que v4l2 ha sido establecido a NULL. Solucionar esto moviendo el mutex_lock() antes de la lectura de dev-mayor que v4l2 y añadiendo una comprobación de NULL para dev-mayor que v4l2 bajo el bloqueo.","source":"nvd"}],"published":"2026-04-24T14:42:12.923Z","modified":"2026-11-11T23:10:00.263Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"8139a4d583abad45eb987b5a99b3281b6d435b7e","fixed":"3c0283a59e36e3707c4a81f4952e362d31f876b8","status":"affected"},{"type":"git","introduced":"8139a4d583abad45eb987b5a99b3281b6d435b7e","fixed":"2cbf81f76842e46bdf25823c70e1db4044a65678","status":"affected"},{"type":"git","introduced":"8139a4d583abad45eb987b5a99b3281b6d435b7e","fixed":"38a327221f7f765e7d853b7bafe47e342441ec85","status":"affected"},{"type":"git","introduced":"8139a4d583abad45eb987b5a99b3281b6d435b7e","fixed":"b5d141ea15f173f15b9f0a72965902f3428c0d92","status":"affected"},{"type":"git","introduced":"8139a4d583abad45eb987b5a99b3281b6d435b7e","fixed":"5fb2940327722b4684d2f964b54c1c90aa277324","status":"affected"},{"type":"git","introduced":"8139a4d583abad45eb987b5a99b3281b6d435b7e","fixed":"871b8ea8ef39a6c253594649f4339378fad3d0dd","status":"affected"},{"type":"git","introduced":"8139a4d583abad45eb987b5a99b3281b6d435b7e","fixed":"6b9e66437cc6123ddedac141e1b8b6fcf57d2972","status":"affected"},{"type":"git","introduced":"8139a4d583abad45eb987b5a99b3281b6d435b7e","fixed":"dd2b888e08d3b3d6aacd65d76cd44fac11da750f","status":"affected"},{"type":"git","introduced":"8139a4d583abad45eb987b5a99b3281b6d435b7e","fixed":"a66485a934c7187ae8e36517d40615fa2e961cff","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.16","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.16","status":"unaffected"},{"type":"semver","introduced":"5.10.258","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.209","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.175","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.136","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.83","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.24","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"6.19.14","lastAffected":"6.19.*","status":"unaffected"},{"type":"semver","introduced":"7.0.1","lastAffected":"7.0.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"6.6.136"},{"status":"affected","introduced":"6.12","fixed":"6.12.83"},{"status":"affected","introduced":"6.13","fixed":"6.18.24"},{"status":"affected","introduced":"6.19","fixed":"6.19.14"},{"status":"affected","introduced":"7.0","fixed":"7.0.1"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/3c0283a59e36e3707c4a81f4952e362d31f876b8","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2cbf81f76842e46bdf25823c70e1db4044a65678","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/38a327221f7f765e7d853b7bafe47e342441ec85","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b5d141ea15f173f15b9f0a72965902f3428c0d92","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5fb2940327722b4684d2f964b54c1c90aa277324","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/871b8ea8ef39a6c253594649f4339378fad3d0dd","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6b9e66437cc6123ddedac141e1b8b6fcf57d2972","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/dd2b888e08d3b3d6aacd65d76cd44fac11da750f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a66485a934c7187ae8e36517d40615fa2e961cff","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-784472.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-06T15:22:09.106Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31583","url":"https://www.cve.org/CVERecord?id=CVE-2026-31583","licence":"CVE Terms of Use","modified":"2026-11-06T15:22:13.449Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31583","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31583","licence":"Public domain","modified":"2026-11-11T23:10:00.263Z"}],"updatedAt":"2026-11-25T22:59:19.495Z","epss":{"score":0.00137,"percentile":0.03306,"date":"2026-12-01T12:00:22.000Z"}}