CVE-2021-47334

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

HIGH
7.8
CVSS Score
Published: May 21, 2024 at 02:35 PM UTC
Updated: June 17, 2026 at 04:17 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.3%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 4.4.2762.6.16 ≤ v < 4.14.2402.6.16 ≤ v < 4.19.1982.6.16 ≤ v < 4.4.2762.6.16 ≤ v < 4.9.2762.6.16 ≤ v < 5.10.522.6.16 ≤ v < 5.12.192.6.16 ≤ v < 5.13.42.6.16 ≤ v < 5.142.6.16 ≤ v < 5.4.1344.10 ≤ v < 4.14.2404.15 ≤ v < 4.19.1984.20 ≤ v < 5.4.1344.5 ≤ v < 4.9.2765.11 ≤ v < 5.12.195.13 ≤ v < 5.13.45.5 ≤ v < 5.10.522.6.16736ce43295682d060f2b93624b4a339f9af6aab1
Vendor states this is fixed in 1512e7dc5eb08b7d92a12e2bfcd9cb8c4a1ec069 (fixed)
Vendor states this is fixed in 29ba8e2ba89ee2862a26d91204dd5fe77ceee25a (fixed)
Vendor states this is fixed in 38660031e80eaa6cc9370b031c180612f414b00d (fixed)
Vendor states this is fixed in 481a76d4749ee3a27f902ba213fdcbb4bb39720e (fixed)
Vendor states this is fixed in 5b06ca113bf197aab2ab61288f42506e0049fbab (fixed)
Vendor states this is fixed in 7272b591c4cb9327c43443f67b8fbae7657dd9ae (fixed)
Vendor states this is fixed in a7268e8a227d5a4f0bd1584f556246b0224ab274 (fixed)
Vendor states this is fixed in b9c87ce3bc6331f82811a8cf8e930423c22523a3 (fixed)
Vendor states this is fixed in ef1067d2baa847d53c9988510d99fb494de4d12c (fixed)
Vendor states this is fixed in 2.6.16 (unaffected)
Vendor states this is fixed in 4.14.240 (unaffected)
Vendor states this is fixed in 4.19.198 (unaffected)
Vendor states this is fixed in 4.4.276 (unaffected)
Vendor states this is fixed in 4.9.276 (unaffected)
Vendor states this is fixed in 5.10.52 (unaffected)
Vendor states this is fixed in 5.12.19 (unaffected)
Vendor states this is fixed in 5.13.4 (unaffected)
Vendor states this is fixed in 5.14 (unaffected)
Vendor states this is fixed in 5.4.134 (unaffected)

References (9)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/1512e7dc5eb08b7d92a12e2bfcd9cb8c4a1ec069
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/29ba8e2ba89ee2862a26d91204dd5fe77ceee25a
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/38660031e80eaa6cc9370b031c180612f414b00d
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/481a76d4749ee3a27f902ba213fdcbb4bb39720e
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/5b06ca113bf197aab2ab61288f42506e0049fbab
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/7272b591c4cb9327c43443f67b8fbae7657dd9ae
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/a7268e8a227d5a4f0bd1584f556246b0224ab274
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/b9c87ce3bc6331f82811a8cf8e930423c22523a3

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-416

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card