{"id":"CVE-2021-47334","aliases":["CVE-2021-47334"],"related":[],"kind":"vulnerability","state":"published","title":"misc/libmasm/module: Fix two use after free in ibmasm_init_one","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nmisc/libmasm/module: Fix two use after free in ibmasm_init_one\n\nIn ibmasm_init_one, it calls ibmasm_init_remote_input_dev().\nInside ibmasm_init_remote_input_dev, mouse_dev and keybd_dev are\nallocated by input_allocate_device(), and assigned to\nsp->remote.mouse_dev and sp->remote.keybd_dev respectively.\n\nIn the err_free_devices error branch of ibmasm_init_one,\nmouse_dev and keybd_dev are freed by input_free_device(), and return\nerror. Then the execution runs into error_send_message error branch\nof ibmasm_init_one, where ibmasm_free_remote_input_dev(sp) is called\nto unregister the freed sp->remote.mouse_dev and sp->remote.keybd_dev.\n\nMy patch add a \"error_init_remote\" label to handle the error of\nibmasm_init_remote_input_dev(), to avoid the uaf bugs.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmisc/libmasm/module: Fix two use after free in ibmasm_init_one\n\nIn ibmasm_init_one, it calls ibmasm_init_remote_input_dev().\nInside ibmasm_init_remote_input_dev, mouse_dev and keybd_dev are\nallocated by input_allocate_device(), and assigned to\nsp->remote.mouse_dev and sp->remote.keybd_dev respectively.\n\nIn the err_free_devices error branch of ibmasm_init_one,\nmouse_dev and keybd_dev are freed by input_free_device(), and return\nerror. Then the execution runs into error_send_message error branch\nof ibmasm_init_one, where ibmasm_free_remote_input_dev(sp) is called\nto unregister the freed sp->remote.mouse_dev and sp->remote.keybd_dev.\n\nMy patch add a \"error_init_remote\" label to handle the error of\nibmasm_init_remote_input_dev(), to avoid the uaf bugs.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: misc/libmasm/module: corrige dos use after free en ibmasm_init_one. En ibmasm_init_one, llama a ibmasm_init_remote_input_dev(). Dentro de ibmasm_init_remote_input_dev, mouse_dev y keybd_dev son asignados por input_allocate_device() y asignados a sp-&gt;remote.mouse_dev y sp-&gt;remote.keybd_dev respectivamente. En la rama de error err_free_devices de ibmasm_init_one, mouse_dev y keybd_dev se liberan mediante input_free_device() y devuelven un error. Luego, la ejecución se ejecuta en la rama de error error_send_message de ibmasm_init_one, donde se llama a ibmasm_free_remote_input_dev(sp) para cancelar el registro de sp-&gt;remote.mouse_dev y sp-&gt;remote.keybd_dev liberados. Mi parche agrega una etiqueta \"error_init_remote\" para manejar el error de ibmasm_init_remote_input_dev(), para evitar los errores de uaf.","source":"nvd"}],"published":"2024-05-21T14:35:44.404Z","modified":"2026-06-17T04:17:13.333Z","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":"736ce43295682d060f2b93624b4a339f9af6aab1","fixed":"1512e7dc5eb08b7d92a12e2bfcd9cb8c4a1ec069","status":"affected"},{"type":"git","introduced":"736ce43295682d060f2b93624b4a339f9af6aab1","fixed":"29ba8e2ba89ee2862a26d91204dd5fe77ceee25a","status":"affected"},{"type":"git","introduced":"736ce43295682d060f2b93624b4a339f9af6aab1","fixed":"5b06ca113bf197aab2ab61288f42506e0049fbab","status":"affected"},{"type":"git","introduced":"736ce43295682d060f2b93624b4a339f9af6aab1","fixed":"481a76d4749ee3a27f902ba213fdcbb4bb39720e","status":"affected"},{"type":"git","introduced":"736ce43295682d060f2b93624b4a339f9af6aab1","fixed":"38660031e80eaa6cc9370b031c180612f414b00d","status":"affected"},{"type":"git","introduced":"736ce43295682d060f2b93624b4a339f9af6aab1","fixed":"b9c87ce3bc6331f82811a8cf8e930423c22523a3","status":"affected"},{"type":"git","introduced":"736ce43295682d060f2b93624b4a339f9af6aab1","fixed":"ef1067d2baa847d53c9988510d99fb494de4d12c","status":"affected"},{"type":"git","introduced":"736ce43295682d060f2b93624b4a339f9af6aab1","fixed":"a7268e8a227d5a4f0bd1584f556246b0224ab274","status":"affected"},{"type":"git","introduced":"736ce43295682d060f2b93624b4a339f9af6aab1","fixed":"7272b591c4cb9327c43443f67b8fbae7657dd9ae","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.16","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.16","status":"unaffected"},{"type":"semver","introduced":"4.4.276","lastAffected":"4.4.*","status":"unaffected"},{"type":"semver","introduced":"4.9.276","lastAffected":"4.9.*","status":"unaffected"},{"type":"semver","introduced":"4.14.240","lastAffected":"4.14.*","status":"unaffected"},{"type":"semver","introduced":"4.19.198","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.134","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.52","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.12.19","lastAffected":"5.12.*","status":"unaffected"},{"type":"semver","introduced":"5.13.4","lastAffected":"5.13.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.14","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":"4.4.276"},{"status":"affected","introduced":"4.5","fixed":"4.9.276"},{"status":"affected","introduced":"4.10","fixed":"4.14.240"},{"status":"affected","introduced":"4.15","fixed":"4.19.198"},{"status":"affected","introduced":"4.20","fixed":"5.4.134"},{"status":"affected","introduced":"5.5","fixed":"5.10.52"},{"status":"affected","introduced":"5.11","fixed":"5.12.19"},{"status":"affected","introduced":"5.13","fixed":"5.13.4"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/1512e7dc5eb08b7d92a12e2bfcd9cb8c4a1ec069","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/29ba8e2ba89ee2862a26d91204dd5fe77ceee25a","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5b06ca113bf197aab2ab61288f42506e0049fbab","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/481a76d4749ee3a27f902ba213fdcbb4bb39720e","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/38660031e80eaa6cc9370b031c180612f414b00d","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b9c87ce3bc6331f82811a8cf8e930423c22523a3","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ef1067d2baa847d53c9988510d99fb494de4d12c","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a7268e8a227d5a4f0bd1584f556246b0224ab274","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7272b591c4cb9327c43443f67b8fbae7657dd9ae","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-05-21T18:44:43.256Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-47334","url":"https://www.cve.org/CVERecord?id=CVE-2021-47334","licence":"CVE Terms of Use","modified":"2026-05-11T13:52:37.429Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-47334","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-47334","licence":"Public domain","modified":"2026-06-17T04:17:13.333Z"}],"updatedAt":"2026-11-25T22:58:08.801Z","epss":{"score":0.00365,"percentile":0.22495,"date":"2026-11-30T12:00:22.000Z"}}