Menu

Star on GitHub · 3.2k

CVE-2021-46933

7.8 · HIGH

In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_fs: Clear ffs_eventfd in ffs_data_clear.

Published Feb 27, 2024CWE-416EPSS 0.24%

Overview

CVE-2021-46933 is a high-severity vulnerability. It was published on February 27, 2024 and has a CVSS 3.1 base score of 7.8 (HIGH).

This vulnerability has a CVSS 3.1 base score of 7.8, rated HIGH. It requires local or adjacent network access to exploit. Some level of privileges is required for exploitation.

Technical description

In the Linux kernel, the following vulnerability has been resolved:

usb: gadget: f_fs: Clear ffs_eventfd in ffs_data_clear.

ffs_data_clear is indirectly called from both ffs_fs_kill_sb and

ffs_ep0_release, so it ends up being called twice when userland closes ep0

and then unmounts f_fs.

If userland provided an eventfd along with function's USB descriptors, it

ends up calling eventfd_ctx_put as many times, causing a refcount

underflow.

NULL-ify ffs_eventfd to prevent these extraneous eventfd_ctx_put calls.

Also, set epfiles to NULL right after de-allocating it, for readability.

For completeness, ffs_data_clear actually ends up being called thrice, the

last call being before the whole ffs structure gets freed, so when this

specific sequence happens there is a second underflow happening (but not

being reported):

/sys/kernel/debug/tracing# modprobe usb_f_fs

/sys/kernel/debug/tracing# echo ffs_data_clear > set_ftrace_filter

/sys/kernel/debug/tracing# echo function > current_tracer

/sys

Remediation

Check the references section for vendor advisories, patches, and mitigation guidance. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

Frequently asked questions

What is CVE-2021-46933?

CVE-2021-46933 is a high-severity vulnerability. It was published on February 27, 2024 and has a CVSS 3.1 base score of 7.8 (HIGH).

How severe is CVE-2021-46933?

This vulnerability has a CVSS 3.1 base score of 7.8, rated HIGH. It requires local or adjacent network access to exploit. Some level of privileges is required for exploitation.

How do I fix or remediate CVE-2021-46933?

Check the references section for vendor advisories, patches, and mitigation guidance. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

How can CyberStrike help with CVE-2021-46933?

CyberStrike is an open-source, AI-augmented pentesting engine. Rather than flag a version number, it tests whether an issue like CVE-2021-46933 is actually reachable in your own applications and APIs, then verifies each finding before reporting it. That tells you if the weakness is a real, exploitable risk in your environment or a false positive you can safely deprioritize.

Related HIGH CVEs from 2021

View all