CVE-2021-46904

Source
https://nvd.nist.gov/vuln/detail/CVE-2021-46904
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2021-46904.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2021-46904
Downstream
Related
Published
2024-02-26T16:27:45Z
Modified
2025-08-09T20:01:25Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
[none]
Details

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 getfreeserialindex() 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 getfreeserialindex() would return the same minor number.

Fix this by modifying getfreeserialindex to assign the minor number immediately after one is found to be and rename it to obtainminor() to better reflect what it does. Similary, rename setserialbyindex() to releaseminor() and modify it to free up the minor number of the given hsoserial. Every obtainminor() should have corresponding release_minor() call.

References

Affected packages