usb: gadget: f_uac1_legacy: remove broken string configfs attributes
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 0854611a19ae4dfa56569e6f640017a1d2dd3312 · < 2ed25c9d4400cf90d9201657963a231c27a5ea57| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: f_uac1_legacy: remove broken string configfs attributes
The UAC1_STR_ATTRIBUTE macro defines configfs show/store handlers for the fn_play, fn_cap, and fn_cntl string options. The store function contains an inverted null check on the kstrndup() return value.
This means every write attempt returns -ENOMEM on success and dereferences a NULL pointer on allocation failure. The attributes have been broken and unused for many years.
Remove the UAC1_STR_ATTRIBUTE macro and the three attributes it generated. The internal defaults (FILE_PCM_PLAYBACK, FILE_PCM_CAPTURE, FILE_CONTROL) set in f_audio_alloc_inst() are unaffected.
From the CVE record · Linux
The Linux kernel's USB gadget f_uac1_legacy configfs string attributes have a broken write handler. A write returns an error when allocation succeeds and dereferences a NULL pointer if allocation fails. The input does not specify authentication requirements or whether the attributes can be reached remotely.
Engineers running Linux kernels with the USB gadget f_uac1_legacy component should check whether their kernel is affected; no affected versions are specified.