nfc: nfcmrvl: Fix memory leak in nfcmrvl_play_deferred
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ f26e30cc6b50ba81e30ca3016c29ad4b48b93eaa · < 6616872cfe7f0474a22dd1f12699f95bcf81a54d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
nfc: nfcmrvl: Fix memory leak in nfcmrvl_play_deferred
Similar to the handling of play_deferred in commit 19cfe912c37b ("Bluetooth: btusb: Fix memory leak in play_deferred"), we thought a patch might be needed here as well.
Currently usb_submit_urb is called directly to submit deferred tx urbs after unanchor them.
So the usb_giveback_urb_bh would failed to unref it in usb_unanchor_urb and cause memory leak.
Put those urbs in tx_anchor to avoid the leak, and also fix the error handling.
From the CVE record · Linux
The Linux kernel’s nfcmrvl NFC code can leak memory when submitting deferred USB transmit requests. The input does not establish whether an attacker can trigger the leak or specify any access, authentication, or user-interaction requirements.
Engineers running Linux kernels with the nfcmrvl NFC code should check their kernel versions; affected versions are not specified.