5.5
MEDIUM
CVE-2021-46904
"Linux net hso: Null Pointer Dereference in TTY Device Unregistration"
Description

In the Linux kernel, the following vulnerability has been resolved: net: hso: fix null-ptr-deref during tty device unregistration Multiple ttys try to claim the same the minor number causing a double unregistration of the same device. The first unregistration succeeds but the next one results in a null-ptr-deref. The get_free_serial_index() function returns an available minor number but doesn't assign it immediately. The assignment is done by the caller later. But before this assignment, calls to get_free_serial_index() would return the same minor number. Fix this by modifying get_free_serial_index to assign the minor number immediately after one is found to be and rename it to obtain_minor() to better reflect what it does. Similary, rename set_serial_by_index() to release_minor() and modify it to free up the minor number of the given hso_serial. Every obtain_minor() should have corresponding release_minor() call.

INFO

Published Date :

Feb. 26, 2024, 4:27 p.m.

Last Modified :

April 17, 2024, 7:33 p.m.

Source :

416baaa9-dc9f-4396-8d5f-8c081fb06d67

Remotely Exploitable :

No

Impact Score :

3.6

Exploitability Score :

1.8
Affected Products

The following products are affected by CVE-2021-46904 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Linux linux_kernel

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2021-46904 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2021-46904 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    May. 28, 2024

    Action Type Old Value New Value
  • CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    May. 14, 2024

    Action Type Old Value New Value
  • Initial Analysis by [email protected]

    Apr. 17, 2024

    Action Type Old Value New Value
    Added CVSS V3.1 NIST AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
    Changed Reference Type https://git.kernel.org/stable/c/145c89c441d27696961752bf51b323f347601bee No Types Assigned https://git.kernel.org/stable/c/145c89c441d27696961752bf51b323f347601bee Patch
    Changed Reference Type https://git.kernel.org/stable/c/388d05f70f1ee0cac4a2068fd295072f1a44152a No Types Assigned https://git.kernel.org/stable/c/388d05f70f1ee0cac4a2068fd295072f1a44152a Patch
    Changed Reference Type https://git.kernel.org/stable/c/4a2933c88399c0ebc738db39bbce3ae89786d723 No Types Assigned https://git.kernel.org/stable/c/4a2933c88399c0ebc738db39bbce3ae89786d723 Patch
    Changed Reference Type https://git.kernel.org/stable/c/8a12f8836145ffe37e9c8733dce18c22fb668b66 No Types Assigned https://git.kernel.org/stable/c/8a12f8836145ffe37e9c8733dce18c22fb668b66 Patch
    Changed Reference Type https://git.kernel.org/stable/c/92028d7a31e55d53e41cff679156b9432cffcb36 No Types Assigned https://git.kernel.org/stable/c/92028d7a31e55d53e41cff679156b9432cffcb36 Patch
    Changed Reference Type https://git.kernel.org/stable/c/a462067d7c8e6953a733bf5ade8db947b1bb5449 No Types Assigned https://git.kernel.org/stable/c/a462067d7c8e6953a733bf5ade8db947b1bb5449 Patch
    Changed Reference Type https://git.kernel.org/stable/c/caf5ac93b3b5d5fac032fc11fbea680e115421b4 No Types Assigned https://git.kernel.org/stable/c/caf5ac93b3b5d5fac032fc11fbea680e115421b4 Patch
    Changed Reference Type https://git.kernel.org/stable/c/dc195928d7e4ec7b5cfc6cd10dc4c8d87a7c72ac No Types Assigned https://git.kernel.org/stable/c/dc195928d7e4ec7b5cfc6cd10dc4c8d87a7c72ac Patch
    Added CWE NIST CWE-476
    Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 2.6.27 up to (excluding) 4.4.268 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.5.0 up to (excluding) 4.9.268 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.10.0 up to (excluding) 4.14.232 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.15.0 up to (excluding) 4.19.187 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.20.0 up to (excluding) 5.4.112 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.5.0 up to (excluding) 5.10.30 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.11.0 up to (excluding) 5.11.14
  • CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    Feb. 26, 2024

    Action Type Old Value New Value
    Added Description In the Linux kernel, the following vulnerability has been resolved: net: hso: fix null-ptr-deref during tty device unregistration Multiple ttys try to claim the same the minor number causing a double unregistration of the same device. The first unregistration succeeds but the next one results in a null-ptr-deref. The get_free_serial_index() function returns an available minor number but doesn't assign it immediately. The assignment is done by the caller later. But before this assignment, calls to get_free_serial_index() would return the same minor number. Fix this by modifying get_free_serial_index to assign the minor number immediately after one is found to be and rename it to obtain_minor() to better reflect what it does. Similary, rename set_serial_by_index() to release_minor() and modify it to free up the minor number of the given hso_serial. Every obtain_minor() should have corresponding release_minor() call.
    Added Reference Linux https://git.kernel.org/stable/c/a462067d7c8e6953a733bf5ade8db947b1bb5449 [No types assigned]
    Added Reference Linux https://git.kernel.org/stable/c/145c89c441d27696961752bf51b323f347601bee [No types assigned]
    Added Reference Linux https://git.kernel.org/stable/c/caf5ac93b3b5d5fac032fc11fbea680e115421b4 [No types assigned]
    Added Reference Linux https://git.kernel.org/stable/c/92028d7a31e55d53e41cff679156b9432cffcb36 [No types assigned]
    Added Reference Linux https://git.kernel.org/stable/c/4a2933c88399c0ebc738db39bbce3ae89786d723 [No types assigned]
    Added Reference Linux https://git.kernel.org/stable/c/dc195928d7e4ec7b5cfc6cd10dc4c8d87a7c72ac [No types assigned]
    Added Reference Linux https://git.kernel.org/stable/c/388d05f70f1ee0cac4a2068fd295072f1a44152a [No types assigned]
    Added Reference Linux https://git.kernel.org/stable/c/8a12f8836145ffe37e9c8733dce18c22fb668b66 [No types assigned]
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2021-46904 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2021-46904 weaknesses.

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability