CVE-2021-46904

Source
https://nvd.nist.gov/vuln/detail/CVE-2021-46904
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-46904.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-46904
Related
Published
2024-02-26T16:27:45Z
Modified
2024-09-18T01:00:22Z
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

Debian:11 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.10.38-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:12 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.10.38-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:13 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.10.38-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}