title: usb: roles: fix NULL pointer issue when put module's reference
description: In the Linux kernel, the following vulnerability has been resolved:
usb: roles: fix NULL pointer issue when put module's reference
In current design, usb role class driver will get usb_role_switch parent's
module reference after the user get usb_role_switch device and put the
reference after the user put the usb_role_switch device. However, the
parent device of usb_role_switch may be removed before the user put the
usb_role_switch. If so, then, NULL pointer issue will be met when the user
put the parent module's reference.
This will save the module pointer in structure of usb_role_switch. Then,
we don't need to find module by iterating long relations.
affected:
{
product: Linux
vendor: Linux
defaultStatus: unaffected
repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
versions:
version: 5c54fcac9a9d, lessThan: e279bf8e5189, status: affected, versionType: git
version: 5c54fcac9a9d, lessThan: ef982fc41055, status: affected, versionType: git
version: 5c54fcac9a9d, lessThan: 0158216805ca, status: affected, versionType: git
version: 5c54fcac9a9d, lessThan: 4b45829440b1, status: affected, versionType: git
version: 5c54fcac9a9d, lessThan: 01f82de440f2, status: affected, versionType: git
version: 5c54fcac9a9d, lessThan: 1c9be13846c0, status: affected, versionType: git
}
{
product: Linux
vendor: Linux
defaultStatus: affected
repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
versions:
version: 4.19, status: affected
version: 0, lessThan: 4.19, status: unaffected, versionType: custom
version: 5.10.211, lessThanOrEqual: 5.10.*, status: unaffected, versionType: custom
version: 5.15.150, lessThanOrEqual: 5.15.*, status: unaffected, versionType: custom
version: 6.1.80, lessThanOrEqual: 6.1.*, status: unaffected, versionType: custom
version: 6.6.19, lessThanOrEqual: 6.6.*, status: unaffected, versionType: custom
version: 6.7.7, lessThanOrEqual: 6.7.*, status: unaffected, versionType: custom
version: 6.8, lessThanOrEqual: *, status: unaffected, versionType: original_commit_for_fix
}
