CVE-2021-47334

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

No CVSS score yet EPSS 0.28%

Published 21 May 2024 Updated 11 May 2026 CNA: Linux

Check your servers for CVE-2021-47334

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2021-47334 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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.

Exploitation

EPSS 0.28%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 21.6% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 21 May 2024):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 736ce43295682d060f2b93624b4a339f9af6aab1, before 1512e7dc5eb08b7d92a12e2bfcd9cb8c4a1ec069
affected from 736ce43295682d060f2b93624b4a339f9af6aab1, before 29ba8e2ba89ee2862a26d91204dd5fe77ceee25a
affected from 736ce43295682d060f2b93624b4a339f9af6aab1, before 5b06ca113bf197aab2ab61288f42506e0049fbab
affected from 736ce43295682d060f2b93624b4a339f9af6aab1, before 481a76d4749ee3a27f902ba213fdcbb4bb39720e
affected from 736ce43295682d060f2b93624b4a339f9af6aab1, before 38660031e80eaa6cc9370b031c180612f414b00d
affected from 736ce43295682d060f2b93624b4a339f9af6aab1, before b9c87ce3bc6331f82811a8cf8e930423c22523a3
affected from 736ce43295682d060f2b93624b4a339f9af6aab1, before ef1067d2baa847d53c9988510d99fb494de4d12c
affected from 736ce43295682d060f2b93624b4a339f9af6aab1, before a7268e8a227d5a4f0bd1584f556246b0224ab274
affected from 736ce43295682d060f2b93624b4a339f9af6aab1, before 7272b591c4cb9327c43443f67b8fbae7657dd9ae
Other versions: unaffected
Linux
affected 2.6.16
unaffected before 2.6.16
unaffected from 4.4.276 up to and including 4.4.*
unaffected from 4.9.276 up to and including 4.9.*
unaffected from 4.14.240 up to and including 4.14.*
unaffected from 4.19.198 up to and including 4.19.*
unaffected from 5.4.134 up to and including 5.4.*
unaffected from 5.10.52 up to and including 5.10.*
unaffected from 5.12.19 up to and including 5.12.*
unaffected from 5.13.4 up to and including 5.13.*
unaffected 5.14 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2021-47334 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2021-47334

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2021-47334
trivy image --scanners vuln IMAGE | grep CVE-2021-47334

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2021-47334 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.