Vulnerability · Published Feb 25, 2024 · Assigned by Linux
CVE-2021-46904net: hso: fix null-ptr-deref during tty device unregistration
Medium 5.5
In plain English
A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 17% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 5.10.38-1 | DEBIAN-CVE-2021-46904 |
| Debian:13 | linux | 5.10.38-1 | DEBIAN-CVE-2021-46904 |
| Debian:14 | linux | 5.10.38-1 | DEBIAN-CVE-2021-46904 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2021-46904 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2021-46904 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2021-46904 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2021-46904 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2021-46904 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2021-46904 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2021-46904 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2021-46904 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2021-46904 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2021-46904 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2021-46904 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2021-46904 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2021-46904 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2021-46904 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2021-46904 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2021-46904 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2021-46904 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2021-46904 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2021-46904 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2021-46904 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2021-46904 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2021-46904 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2021-46904 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2021-46904 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 72dc1c096c7051a48ab1dbb12f71976656b55eb5 – before a462067d7c8e6953a733bf5ade8db947b1bb544972dc1c096c7051a48ab1dbb12f71976656b55eb5 – before 145c89c441d27696961752bf51b323f347601bee72dc1c096c7051a48ab1dbb12f71976656b55eb5 – before caf5ac93b3b5d5fac032fc11fbea680e115421b472dc1c096c7051a48ab1dbb12f71976656b55eb5 – before 92028d7a31e55d53e41cff679156b9432cffcb3672dc1c096c7051a48ab1dbb12f71976656b55eb5 – before 4a2933c88399c0ebc738db39bbce3ae89786d72372dc1c096c7051a48ab1dbb12f71976656b55eb5 – before dc195928d7e4ec7b5cfc6cd10dc4c8d87a7c72ac72dc1c096c7051a48ab1dbb12f71976656b55eb5 – before 388d05f70f1ee0cac4a2068fd295072f1a44152a72dc1c096c7051a48ab1dbb12f71976656b55eb5 – before 8a12f8836145ffe37e9c8733dce18c22fb668b66 |
| Linux | Linux | 2.6.27 |
References
- https://git.kernel.org/stable/c/a462067d7c8e6953a733bf5ade8db947b1bb5449
- https://git.kernel.org/stable/c/145c89c441d27696961752bf51b323f347601bee
- https://git.kernel.org/stable/c/caf5ac93b3b5d5fac032fc11fbea680e115421b4
- https://git.kernel.org/stable/c/92028d7a31e55d53e41cff679156b9432cffcb36
- https://git.kernel.org/stable/c/4a2933c88399c0ebc738db39bbce3ae89786d723
- https://git.kernel.org/stable/c/dc195928d7e4ec7b5cfc6cd10dc4c8d87a7c72ac
- https://git.kernel.org/stable/c/388d05f70f1ee0cac4a2068fd295072f1a44152a
- https://git.kernel.org/stable/c/8a12f8836145ffe37e9c8733dce18c22fb668b66