Linux: usbip: vhci_hcd: fix NULL deref in status_show_vhci
What fixes it
- 2b477ee5cc9c2670185ffd82911a20e1760008c2LinuxCVE List
- 671d2687a790f63110c3c4213230209f5c3e0e8eLinuxCVE List
- 517c353e5358b2123cbf620a1798fe632fb7bdceLinuxCVE List
- 046a94fdb02eb1df86c8fa4614104ff801ba3ab7LinuxCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
In the Linux kernel, the following vulnerability has been resolved:
usbip: vhci_hcd: fix NULL deref in status_show_vhci
platform_get_drvdata() can return NULL if a VHCI host controller's probe failed (e.g. due to USB bus number exhaustion). status_show_vhci() checked for a NULL pdev but not for a NULL hcd returned by platform_get_drvdata(). Passing NULL to hcd_to_vhci_hcd() does not return NULL - it returns a pointer offset of 0x260, causing a NULL pointer dereference when that value is subsequently dereferenced.
Add a NULL check on hcd before calling hcd_to_vhci_hcd(). Move status_show_not_ready() above status_show_vhci() to make it callable from the new error path without a forward declaration.
Text from CVE List
Affected versions 16
- Linuxaffected: 0775a9cbc694e8c7276688be3bbd2f386167ab54 before 2b477ee5cc9c2670185ffd82911a20e1760008c2CVE List
- Linuxaffected: 0775a9cbc694e8c7276688be3bbd2f386167ab54 before 671d2687a790f63110c3c4213230209f5c3e0e8eCVE List
- Linuxaffected: 0775a9cbc694e8c7276688be3bbd2f386167ab54 before fd7d938ab4759a45eb107e658c199a2c47cc1aceCVE List
- Linuxaffected: 0775a9cbc694e8c7276688be3bbd2f386167ab54 before 517c353e5358b2123cbf620a1798fe632fb7bdceCVE List
- Linuxaffected: 0775a9cbc694e8c7276688be3bbd2f386167ab54 before 046a94fdb02eb1df86c8fa4614104ff801ba3ab7CVE List
- Linuxaffected: 0775a9cbc694e8c7276688be3bbd2f386167ab54 before dacd7c317ba12e035653c28a0eaaf23d91abc073CVE List
- Linuxaffected: 0775a9cbc694e8c7276688be3bbd2f386167ab54 before bc150783542ba2e7c1257d1299c6f3269bdba270CVE List
- Linuxaffected: 4.9CVE List
- Linuxunaffected: all versions before 4.9CVE List
- Linuxunaffected: 5.10.271 through 5.10.*CVE List
- Linuxunaffected: 5.15.222 through 5.15.*CVE List
- Linuxunaffected: 6.1.189 through 6.1.*CVE List
- Linuxunaffected: 6.6.158 through 6.6.*CVE List
- Linuxunaffected: 6.12.111 through 6.12.*CVE List
- Linuxunaffected: 6.18.53 through 6.18.*CVE List
- Linuxunaffected: 7.2CVE List
References 7
- git.kernel.org/stable/c/2b477ee5cc9c2670185ffd82911a20e1760008c2Referencevia CVE List
- git.kernel.org/stable/c/671d2687a790f63110c3c4213230209f5c3e0e8eReferencevia CVE List
- git.kernel.org/stable/c/fd7d938ab4759a45eb107e658c199a2c47cc1aceReferencevia CVE List
- git.kernel.org/stable/c/517c353e5358b2123cbf620a1798fe632fb7bdceReferencevia CVE List
- git.kernel.org/stable/c/046a94fdb02eb1df86c8fa4614104ff801ba3ab7Referencevia CVE List
- git.kernel.org/stable/c/dacd7c317ba12e035653c28a0eaaf23d91abc073Referencevia CVE List
- git.kernel.org/stable/c/bc150783542ba2e7c1257d1299c6f3269bdba270Referencevia CVE List