In the Linux kernel, the following vulnerability has been resolved:
ALSA: bcd2000: Fix a UAF bug on the error path of probing
When the driver fails in sndcardregister() at probe time, it will free the 'bcd2k->midiouturb' before killing it, which may cause a UAF bug.
The following log can reveal it:
[ 50.727020] BUG: KASAN: use-after-free in bcd2000inputcomplete+0x1f1/0x2e0 [sndbcd2000] [ 50.727623] Read of size 8 at addr ffff88810fab0e88 by task swapper/4/0 [ 50.729530] Call Trace: [ 50.732899] bcd2000inputcomplete+0x1f1/0x2e0 [sndbcd2000]
Fix this by adding usbkillurb() before usbfreeurb().
[
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@05e0bb8c3c4dde3e21b9c1cf9395afb04e8b24db",
"id": "CVE-2022-50229-04032fed",
"digest": {
"function_hash": "50217674656300923454506009075250783785",
"length": 216.0
},
"target": {
"function": "bcd2000_free_usb_related_resources",
"file": "sound/usb/bcd2000/bcd2000.c"
},
"signature_type": "Function",
"signature_version": "v1"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@64ca7f50ad96c2c65ae390b954925a36eabe04aa",
"id": "CVE-2022-50229-09a19031",
"digest": {
"function_hash": "50217674656300923454506009075250783785",
"length": 216.0
},
"target": {
"function": "bcd2000_free_usb_related_resources",
"file": "sound/usb/bcd2000/bcd2000.c"
},
"signature_type": "Function",
"signature_version": "v1"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@348620464a5c127399ac09b266f494f393661952",
"id": "CVE-2022-50229-160aab30",
"digest": {
"function_hash": "50217674656300923454506009075250783785",
"length": 216.0
},
"target": {
"function": "bcd2000_free_usb_related_resources",
"file": "sound/usb/bcd2000/bcd2000.c"
},
"signature_type": "Function",
"signature_version": "v1"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ffb2759df7efbc00187bfd9d1072434a13a54139",
"id": "CVE-2022-50229-171fe713",
"digest": {
"threshold": 0.9,
"line_hashes": [
"65987232022424984764794160592762689333",
"172904496025043491016492787315981744939",
"49334361110193766380601217006638289016"
]
},
"target": {
"file": "sound/usb/bcd2000/bcd2000.c"
},
"signature_type": "Line",
"signature_version": "v1"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a718eba7e458e2f40531be3c6b6a0028ca7fcace",
"id": "CVE-2022-50229-29f1f3a9",
"digest": {
"threshold": 0.9,
"line_hashes": [
"65987232022424984764794160592762689333",
"172904496025043491016492787315981744939",
"49334361110193766380601217006638289016"
]
},
"target": {
"file": "sound/usb/bcd2000/bcd2000.c"
},
"signature_type": "Line",
"signature_version": "v1"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b0d4af0a4763ddc02344789ef2a281c494bc330d",
"id": "CVE-2022-50229-378b6fbe",
"digest": {
"function_hash": "50217674656300923454506009075250783785",
"length": 216.0
},
"target": {
"function": "bcd2000_free_usb_related_resources",
"file": "sound/usb/bcd2000/bcd2000.c"
},
"signature_type": "Function",
"signature_version": "v1"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5e7338f4dd92b2f8915a82abfa1dd3ad3464bea0",
"id": "CVE-2022-50229-576be86b",
"digest": {
"threshold": 0.9,
"line_hashes": [
"65987232022424984764794160592762689333",
"172904496025043491016492787315981744939",
"49334361110193766380601217006638289016"
]
},
"target": {
"file": "sound/usb/bcd2000/bcd2000.c"
},
"signature_type": "Line",
"signature_version": "v1"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b0d4af0a4763ddc02344789ef2a281c494bc330d",
"id": "CVE-2022-50229-7278d607",
"digest": {
"threshold": 0.9,
"line_hashes": [
"65987232022424984764794160592762689333",
"172904496025043491016492787315981744939",
"49334361110193766380601217006638289016"
]
},
"target": {
"file": "sound/usb/bcd2000/bcd2000.c"
},
"signature_type": "Line",
"signature_version": "v1"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@64ca7f50ad96c2c65ae390b954925a36eabe04aa",
"id": "CVE-2022-50229-729421d6",
"digest": {
"threshold": 0.9,
"line_hashes": [
"65987232022424984764794160592762689333",
"172904496025043491016492787315981744939",
"49334361110193766380601217006638289016"
]
},
"target": {
"file": "sound/usb/bcd2000/bcd2000.c"
},
"signature_type": "Line",
"signature_version": "v1"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ffb2759df7efbc00187bfd9d1072434a13a54139",
"id": "CVE-2022-50229-7a45642f",
"digest": {
"function_hash": "50217674656300923454506009075250783785",
"length": 216.0
},
"target": {
"function": "bcd2000_free_usb_related_resources",
"file": "sound/usb/bcd2000/bcd2000.c"
},
"signature_type": "Function",
"signature_version": "v1"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4fc41f7ebb7efca282f1740ea934d16f33c1d109",
"id": "CVE-2022-50229-83636620",
"digest": {
"function_hash": "50217674656300923454506009075250783785",
"length": 216.0
},
"target": {
"function": "bcd2000_free_usb_related_resources",
"file": "sound/usb/bcd2000/bcd2000.c"
},
"signature_type": "Function",
"signature_version": "v1"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1d6a246cf97c380f2da76591f03019dd9c9599c3",
"id": "CVE-2022-50229-ac9f5398",
"digest": {
"function_hash": "50217674656300923454506009075250783785",
"length": 216.0
},
"target": {
"function": "bcd2000_free_usb_related_resources",
"file": "sound/usb/bcd2000/bcd2000.c"
},
"signature_type": "Function",
"signature_version": "v1"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a718eba7e458e2f40531be3c6b6a0028ca7fcace",
"id": "CVE-2022-50229-c7120d76",
"digest": {
"function_hash": "50217674656300923454506009075250783785",
"length": 216.0
},
"target": {
"function": "bcd2000_free_usb_related_resources",
"file": "sound/usb/bcd2000/bcd2000.c"
},
"signature_type": "Function",
"signature_version": "v1"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4fc41f7ebb7efca282f1740ea934d16f33c1d109",
"id": "CVE-2022-50229-cc984509",
"digest": {
"threshold": 0.9,
"line_hashes": [
"65987232022424984764794160592762689333",
"172904496025043491016492787315981744939",
"49334361110193766380601217006638289016"
]
},
"target": {
"file": "sound/usb/bcd2000/bcd2000.c"
},
"signature_type": "Line",
"signature_version": "v1"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1d6a246cf97c380f2da76591f03019dd9c9599c3",
"id": "CVE-2022-50229-cce3c212",
"digest": {
"threshold": 0.9,
"line_hashes": [
"65987232022424984764794160592762689333",
"172904496025043491016492787315981744939",
"49334361110193766380601217006638289016"
]
},
"target": {
"file": "sound/usb/bcd2000/bcd2000.c"
},
"signature_type": "Line",
"signature_version": "v1"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5e7338f4dd92b2f8915a82abfa1dd3ad3464bea0",
"id": "CVE-2022-50229-d82b8069",
"digest": {
"function_hash": "50217674656300923454506009075250783785",
"length": 216.0
},
"target": {
"function": "bcd2000_free_usb_related_resources",
"file": "sound/usb/bcd2000/bcd2000.c"
},
"signature_type": "Function",
"signature_version": "v1"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@05e0bb8c3c4dde3e21b9c1cf9395afb04e8b24db",
"id": "CVE-2022-50229-e4d10ed8",
"digest": {
"threshold": 0.9,
"line_hashes": [
"65987232022424984764794160592762689333",
"172904496025043491016492787315981744939",
"49334361110193766380601217006638289016"
]
},
"target": {
"file": "sound/usb/bcd2000/bcd2000.c"
},
"signature_type": "Line",
"signature_version": "v1"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@348620464a5c127399ac09b266f494f393661952",
"id": "CVE-2022-50229-f512a605",
"digest": {
"threshold": 0.9,
"line_hashes": [
"65987232022424984764794160592762689333",
"172904496025043491016492787315981744939",
"49334361110193766380601217006638289016"
]
},
"target": {
"file": "sound/usb/bcd2000/bcd2000.c"
},
"signature_type": "Line",
"signature_version": "v1"
}
]