{"id":"CVE-2022-50626","aliases":["CVE-2022-50626"],"related":[],"kind":"vulnerability","state":"published","title":"media: dvb-usb: fix memory leak in dvb_usb_adapter_init()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: dvb-usb: fix memory leak in dvb_usb_adapter_init()\n\nSyzbot reports a memory leak in \"dvb_usb_adapter_init()\".\nThe leak is due to not accounting for and freeing current iteration's\nadapter->priv in case of an error. Currently if an error occurs,\nit will exit before incrementing \"num_adapters_initalized\",\nwhich is used as a reference counter to free all adap->priv\nin \"dvb_usb_adapter_exit()\". There are multiple error paths that\ncan exit from before incrementing the counter. Including the\nerror handling paths for \"dvb_usb_adapter_stream_init()\",\n\"dvb_usb_adapter_dvb_init()\" and \"dvb_usb_adapter_frontend_init()\"\nwithin \"dvb_usb_adapter_init()\".\n\nThis means that in case of an error in any of these functions the\ncurrent iteration is not accounted for and the current iteration's\nadap->priv is not freed.\n\nFix this by freeing the current iteration's adap->priv in the\n\"stream_init_err:\" label in the error path. The rest of the\n(accounted for) adap->priv objects are freed in dvb_usb_adapter_exit()\nas expected using the num_adapters_initalized variable.\n\nSyzbot report:\n\nBUG: memory leak\nunreferenced object 0xffff8881172f1a00 (size 512):\n  comm \"kworker/0:2\", pid 139, jiffies 4294994873 (age 10.960s)\n  hex dump (first 32 bytes):\n    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................\n    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................\nbacktrace:\n    [<ffffffff844af012>] dvb_usb_adapter_init drivers/media/usb/dvb-usb/dvb-usb-init.c:75 [inline]\n    [<ffffffff844af012>] dvb_usb_init drivers/media/usb/dvb-usb/dvb-usb-init.c:184 [inline]\n    [<ffffffff844af012>] dvb_usb_device_init.cold+0x4e5/0x79e drivers/media/usb/dvb-usb/dvb-usb-init.c:308\n    [<ffffffff830db21d>] dib0700_probe+0x8d/0x1b0 drivers/media/usb/dvb-usb/dib0700_core.c:883\n    [<ffffffff82d3fdc7>] usb_probe_interface+0x177/0x370 drivers/usb/core/driver.c:396\n    [<ffffffff8274ab37>] call_driver_probe drivers/base/dd.c:542 [inline]\n    [<ffffffff8274ab37>] really_probe.part.0+0xe7/0x310 drivers/base/dd.c:621\n    [<ffffffff8274ae6c>] really_probe drivers/base/dd.c:583 [inline]\n    [<ffffffff8274ae6c>] __driver_probe_device+0x10c/0x1e0 drivers/base/dd.c:752\n    [<ffffffff8274af6a>] driver_probe_device+0x2a/0x120 drivers/base/dd.c:782\n    [<ffffffff8274b786>] __device_attach_driver+0xf6/0x140 drivers/base/dd.c:899\n    [<ffffffff82747c87>] bus_for_each_drv+0xb7/0x100 drivers/base/bus.c:427\n    [<ffffffff8274b352>] __device_attach+0x122/0x260 drivers/base/dd.c:970\n    [<ffffffff827498f6>] bus_probe_device+0xc6/0xe0 drivers/base/bus.c:487\n    [<ffffffff82745cdb>] device_add+0x5fb/0xdf0 drivers/base/core.c:3405\n    [<ffffffff82d3d202>] usb_set_configuration+0x8f2/0xb80 drivers/usb/core/message.c:2170\n    [<ffffffff82d4dbfc>] usb_generic_driver_probe+0x8c/0xc0 drivers/usb/core/generic.c:238\n    [<ffffffff82d3f49c>] usb_probe_device+0x5c/0x140 drivers/usb/core/driver.c:293\n    [<ffffffff8274ab37>] call_driver_probe drivers/base/dd.c:542 [inline]\n    [<ffffffff8274ab37>] really_probe.part.0+0xe7/0x310 drivers/base/dd.c:621\n    [<ffffffff8274ae6c>] really_probe drivers/base/dd.c:583 [inline]\n    [<ffffffff8274ae6c>] __driver_probe_device+0x10c/0x1e0 drivers/base/dd.c:752","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: dvb-usb: fix memory leak in dvb_usb_adapter_init()\n\nSyzbot reports a memory leak in \"dvb_usb_adapter_init()\".\nThe leak is due to not accounting for and freeing current iteration's\nadapter->priv in case of an error. Currently if an error occurs,\nit will exit before incrementing \"num_adapters_initalized\",\nwhich is used as a reference counter to free all adap->priv\nin \"dvb_usb_adapter_exit()\". There are multiple error paths that\ncan exit from before incrementing the counter. Including the\nerror handling paths for \"dvb_usb_adapter_stream_init()\",\n\"dvb_usb_adapter_dvb_init()\" and \"dvb_usb_adapter_frontend_init()\"\nwithin \"dvb_usb_adapter_init()\".\n\nThis means that in case of an error in any of these functions the\ncurrent iteration is not accounted for and the current iteration's\nadap->priv is not freed.\n\nFix this by freeing the current iteration's adap->priv in the\n\"stream_init_err:\" label in the error path. The rest of the\n(accounted for) adap->priv objects are freed in dvb_usb_adapter_exit()\nas expected using the num_adapters_initalized variable.\n\nSyzbot report:\n\nBUG: memory leak\nunreferenced object 0xffff8881172f1a00 (size 512):\n  comm \"kworker/0:2\", pid 139, jiffies 4294994873 (age 10.960s)\n  hex dump (first 32 bytes):\n    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................\n    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................\nbacktrace:\n    [<ffffffff844af012>] dvb_usb_adapter_init drivers/media/usb/dvb-usb/dvb-usb-init.c:75 [inline]\n    [<ffffffff844af012>] dvb_usb_init drivers/media/usb/dvb-usb/dvb-usb-init.c:184 [inline]\n    [<ffffffff844af012>] dvb_usb_device_init.cold+0x4e5/0x79e drivers/media/usb/dvb-usb/dvb-usb-init.c:308\n    [<ffffffff830db21d>] dib0700_probe+0x8d/0x1b0 drivers/media/usb/dvb-usb/dib0700_core.c:883\n    [<ffffffff82d3fdc7>] usb_probe_interface+0x177/0x370 drivers/usb/core/driver.c:396\n    [<ffffffff8274ab37>] call_driver_probe drivers/base/dd.c:542 [inline]\n    [<ffffffff8274ab37>] really_probe.part.0+0xe7/0x310 drivers/base/dd.c:621\n    [<ffffffff8274ae6c>] really_probe drivers/base/dd.c:583 [inline]\n    [<ffffffff8274ae6c>] __driver_probe_device+0x10c/0x1e0 drivers/base/dd.c:752\n    [<ffffffff8274af6a>] driver_probe_device+0x2a/0x120 drivers/base/dd.c:782\n    [<ffffffff8274b786>] __device_attach_driver+0xf6/0x140 drivers/base/dd.c:899\n    [<ffffffff82747c87>] bus_for_each_drv+0xb7/0x100 drivers/base/bus.c:427\n    [<ffffffff8274b352>] __device_attach+0x122/0x260 drivers/base/dd.c:970\n    [<ffffffff827498f6>] bus_probe_device+0xc6/0xe0 drivers/base/bus.c:487\n    [<ffffffff82745cdb>] device_add+0x5fb/0xdf0 drivers/base/core.c:3405\n    [<ffffffff82d3d202>] usb_set_configuration+0x8f2/0xb80 drivers/usb/core/message.c:2170\n    [<ffffffff82d4dbfc>] usb_generic_driver_probe+0x8c/0xc0 drivers/usb/core/generic.c:238\n    [<ffffffff82d3f49c>] usb_probe_device+0x5c/0x140 drivers/usb/core/driver.c:293\n    [<ffffffff8274ab37>] call_driver_probe drivers/base/dd.c:542 [inline]\n    [<ffffffff8274ab37>] really_probe.part.0+0xe7/0x310 drivers/base/dd.c:621\n    [<ffffffff8274ae6c>] really_probe drivers/base/dd.c:583 [inline]\n    [<ffffffff8274ae6c>] __driver_probe_device+0x10c/0x1e0 drivers/base/dd.c:752","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nmedia: dvb-usb: corrección de fuga de memoria en dvb_usb_adapter_init()\n\nSyzbot informa una fuga de memoria en ’dvb_usb_adapter_init()’.\nLa fuga se debe a no contabilizar y liberar el adapter -> priv de la iteración actual en caso de un error. Actualmente, si ocurre un error, saldrá antes de incrementar ’num_adapters_initalized’, que se utiliza como contador de referencia para liberar todos los adap -> priv en ’dvb_usb_adapter_exit()’. Existen múltiples rutas de error que pueden salir antes de incrementar el contador. Incluyendo las rutas de manejo de errores para ’dvb_usb_adapter_stream_init()’, ’dvb_usb_adapter_dvb_init()’ y ’dvb_usb_adapter_frontend_init()’ dentro de ’dvb_usb_adapter_init()’.\n\nEsto significa que en caso de un error en cualquiera de estas funciones, la iteración actual no se contabiliza y el adap -> priv de la iteración actual no se libera.\n\nSe corrige esto liberando el adap -> priv de la iteración actual en la etiqueta ’stream_init_err:’ en la ruta de error. El resto de los objetos adap -> priv (contabilizados) se liberan en dvb_usb_adapter_exit() como se espera utilizando la variable num_adapters_initalized.\n\nInforme de Syzbot:\n\nERROR: fuga de memoria\nobjeto sin referencia 0x ffff8881172f1a00 (tamaño 512):\n  comm ’kworker/0:2’, pid 139, jiffies 4294994873 (antigüedad 10.960s)\n  volcado hexadecimal (primeros 32 bytes):\n    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................\n    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................\nrastreo de pila:\n    [[ffffffff844af012]] dvb_usb_adapter_init drivers/media/usb/dvb-usb/dvb-usb-init.c:75 [inline]\n    [[ffffffff844af012]] dvb_usb_init drivers/media/usb/dvb-usb/dvb-usb-init.c:184 [inline]\n    [[ffffffff844af012]] dvb_usb_device_init.cold+0x4e5/0x79e drivers/media/usb/dvb-usb/dvb-usb-init.c:308\n    [[ffffffff830db21d]] dib0700_probe+0x8d/0x1b0 drivers/media/usb/dvb-usb/dib0700_core.c:883\n    [[ffffffff82d3fdc7]] usb_probe_interface+0x177/0x370 drivers/usb/core/driver.c:396\n    [[ffffffff8274ab37]] call_driver_probe drivers/base/dd.c:542 [inline]\n    [[ffffffff8274ab37]] really_probe.part.0+0xe7/0x310 drivers/base/dd.c:621\n    [[ffffffff8274ae6c]] really_probe drivers/base/dd.c:583 [inline]\n    [[ffffffff8274ae6c]] __driver_probe_device+0x10c/0x1e0 drivers/base/dd.c:752\n    [[ffffffff8274af6a]] driver_probe_device+0x2a/0x120 drivers/base/dd.c:782\n    [[ffffffff8274b786]] __device_attach_driver+0xf6/0x140 drivers/base/dd.c:899\n    [[ffffffff82747c87]] bus_for_each_drv+0xb7/0x100 drivers/base/bus.c:427\n    [[ffffffff8274b352]] __device_attach+0x122/0x260 drivers/base/dd.c:970\n    [[ffffffff827498f6]] bus_probe_device+0xc6/0xe0 drivers/base/bus.c:487\n    [[ffffffff82745cdb]] device_add+0x5fb/0xdf0 drivers/base/core.c:3405\n    [[ffffffff82d3d202]] usb_set_configuration+0x8f2/0xb80 drivers/usb/core/message.c:2170\n    [[ffffffff82d4dbfc]] usb_generic_driver_probe+0x8c/0xc0 drivers/usb/core/generic.c:238\n    [[ffffffff82d3f49c]] usb_probe_device+0x5c/0x140 drivers/usb/core/driver.c:293\n    [[ffffffff8274ab37]] call_driver_probe drivers/base/dd.c:542 [inline]\n    [[ffffffff8274ab37]] really_probe.part.0+0xe7/0x310 drivers/base/dd.c:621\n    [[ffffffff8274ae6c]] really_probe drivers/base/dd.c:583 [inline]\n    [[ffffffff8274ae6c]] __driver_probe_device+0x10c/0x1e0 drivers/base/dd.c:752","source":"nvd"}],"published":"2025-12-08T01:16:40.754Z","modified":"2026-11-11T23:10:00.263Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"4d43e13f723e12734257277cc38497fab1efc605","fixed":"733bc9e226da2a7f43b10031b8ebfc26d89ec4bd","status":"affected"},{"type":"git","introduced":"4d43e13f723e12734257277cc38497fab1efc605","fixed":"e5a49140035591d13ff57a7537c65217e5af0d15","status":"affected"},{"type":"git","introduced":"4d43e13f723e12734257277cc38497fab1efc605","fixed":"21b6b0c9f3796e6917e90db403dae9e74025fc40","status":"affected"},{"type":"git","introduced":"4d43e13f723e12734257277cc38497fab1efc605","fixed":"17217737c174883dd975885ab4bee4b00f517239","status":"affected"},{"type":"git","introduced":"4d43e13f723e12734257277cc38497fab1efc605","fixed":"7d7ab25ead969594df05fb09ee46ca931d46c5c8","status":"affected"},{"type":"git","introduced":"4d43e13f723e12734257277cc38497fab1efc605","fixed":"d0af6220bb1eed8225a5511de5a3bd386b94afa4","status":"affected"},{"type":"git","introduced":"4d43e13f723e12734257277cc38497fab1efc605","fixed":"e5d01eb6dc2f699a395d3e731c58a9b3bb4e269f","status":"affected"},{"type":"git","introduced":"4d43e13f723e12734257277cc38497fab1efc605","fixed":"93bbf2ed428142aa9a9693721230b28571678bf8","status":"affected"},{"type":"git","introduced":"4d43e13f723e12734257277cc38497fab1efc605","fixed":"94d90fb06b94a90c176270d38861bcba34ce377d","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.19","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.19","status":"unaffected"},{"type":"semver","introduced":"4.9.337","lastAffected":"4.9.*","status":"unaffected"},{"type":"semver","introduced":"4.14.303","lastAffected":"4.14.*","status":"unaffected"},{"type":"semver","introduced":"4.19.270","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.229","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.163","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.86","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.0.16","lastAffected":"6.0.*","status":"unaffected"},{"type":"semver","introduced":"6.1.2","lastAffected":"6.1.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.2","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/733bc9e226da2a7f43b10031b8ebfc26d89ec4bd","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e5a49140035591d13ff57a7537c65217e5af0d15","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/21b6b0c9f3796e6917e90db403dae9e74025fc40","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/17217737c174883dd975885ab4bee4b00f517239","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7d7ab25ead969594df05fb09ee46ca931d46c5c8","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d0af6220bb1eed8225a5511de5a3bd386b94afa4","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e5d01eb6dc2f699a395d3e731c58a9b3bb4e269f","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/93bbf2ed428142aa9a9693721230b28571678bf8","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/94d90fb06b94a90c176270d38861bcba34ce377d","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-50626","url":"https://www.cve.org/CVERecord?id=CVE-2022-50626","licence":"CVE Terms of Use","modified":"2026-05-11T19:22:29.322Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-50626","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50626","licence":"Public domain","modified":"2026-11-11T23:10:00.263Z"}],"updatedAt":"2026-11-25T22:58:21.293Z","epss":{"score":0.00251,"percentile":0.17596,"date":"2026-12-01T12:00:22.000Z"}}