misc/libmasm/module: Fix two use after free in ibmasm_init_one (Linux Linux)

CVE-2021-47334
HIGH 7.8

En bref

Source
NVD
EPSS
EPSS 0.28 % · centile 20 ()
État
PUBLISHED
Publiée
Mise à jour
Attribuée par
Linux
Statut NVD
Analyzed

Description

In the Linux kernel, the following vulnerability has been resolved: misc/libmasm/module: Fix two use after free in ibmasm_init_one In ibmasm_init_one, it calls ibmasm_init_remote_input_dev(). Inside ibmasm_init_remote_input_dev, mouse_dev and keybd_dev are allocated by input_allocate_device(), and assigned to sp->remote.mouse_dev and sp->remote.keybd_dev respectively. In the err_free_devices error branch of ibmasm_init_one, mouse_dev and keybd_dev are freed by input_free_device(), and return error. Then the execution runs into error_send_message error branch of ibmasm_init_one, where ibmasm_free_remote_input_dev(sp) is called to unregister the freed sp->remote.mouse_dev and sp->remote.keybd_dev. My patch add a "error_init_remote" label to handle the error of ibmasm_init_remote_input_dev(), to avoid the uaf bugs.

Faiblesses (CWE)

  • CWE-416 — Utilisation après libération

Références

Scores

VersionScoreVecteurÉvalué par
CVSS 3.1HIGH 7.8CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HNVD · nvd@nist.gov (Primary)

Références européennes

Avis du CERT-FR

Configurations affectées (CPE NVD)

Produits affectés

ProduitVersions
Linux · Linuxaffected 736ce43295682d060f2b93624b4a339f9af6aab1 < 1512e7dc5eb08b7d92a12e2bfcd9cb8c4a1ec069 ; affected 736ce43295682d060f2b93624b4a339f9af6aab1 < 29ba8e2ba89ee2862a26d91204dd5fe77ceee25a ; affected 736ce43295682d060f2b93624b4a339f9af6aab1 < 5b06ca113bf197aab2ab61288f42506e0049fbab ; affected 736ce43295682d060f2b93624b4a339f9af6aab1 < 481a76d4749ee3a27f902ba213fdcbb4bb39720e ; affected 736ce43295682d060f2b93624b4a339f9af6aab1 < 38660031e80eaa6cc9370b031c180612f414b00d ; affected 736ce43295682d060f2b93624b4a339f9af6aab1 < b9c87ce3bc6331f82811a8cf8e930423c22523a3
Linux · Linuxaffected 2.6.16 ; unaffected 0 < 2.6.16 ; unaffected 4.4.276 ≤ 4.4.* ; unaffected 4.9.276 ≤ 4.9.* ; unaffected 4.14.240 ≤ 4.14.* ; unaffected 4.19.198 ≤ 4.19.*

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD