In the Linux kernel, the following vulnerability has been resolved:
usb: usbtmc: Fix bug in pipe direction for control transfers
The syzbot fuzzer reported a minor bug in the usbtmc driver:
usb 5-1: BOGUS control dir, pipe 80001e80 doesn't match bRequestType 0 WARNING: CPU: 0 PID: 3813 at drivers/usb/core/urb.c:412 usbsubmiturb+0x13a5/0x1970 drivers/usb/core/urb.c:410 Modules linked in: CPU: 0 PID: 3813 Comm: syz-executor122 Not tainted 5.17.0-rc5-syzkaller-00306-g2293be58d6a1 #0 ... Call Trace: <TASK> usbstartwaiturb+0x113/0x530 drivers/usb/core/message.c:58 usbinternalcontrolmsg drivers/usb/core/message.c:102 [inline] usbcontrolmsg+0x2a5/0x4b0 drivers/usb/core/message.c:153 usbtmcioctlrequest drivers/usb/class/usbtmc.c:1947 [inline]
The problem is that usbtmcioctlrequest() uses usb_rcvctrlpipe() for all of its transfers, whether they are in or out. It's easy to fix.
[
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "149535209674659714067772873498026465502",
"length": 1065.0
},
"id": "CVE-2022-48834-5d0a3161",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5f6a2d63c68c12cf61259df7c3527a0e05dce952",
"target": {
"file": "drivers/usb/class/usbtmc.c",
"function": "usbtmc_ioctl_request"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"315172892409999828731882165030861670806",
"190486688488904592735555372673517806070",
"213259560541981459453165295804520928549",
"26900478183067714728917200933575810969",
"265411232992800224031593404512398698329",
"70153044305211489351156081469877560571",
"44642023498032912952463833441447050402",
"280990010770550338462797488862435419644",
"55644347917556935556966119826931618114",
"16253196083188674229321387850389778671",
"263388355776548536272999549106545262769",
"144591641446920278577517561662794417654",
"58506023433090167606199246288628404323",
"160149790736781384158979287575653824380",
"106746260799823809645752471584123217423",
"288328600606159045075107921548186474370",
"124995022956872682781637100790669716312",
"180032074369952216561151703964448441092",
"321730453154891143708249092517813328913",
"260907180297121409547851381868166181115",
"215355258347399719475156044007122718558"
]
},
"id": "CVE-2022-48834-6e0335c3",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@10a805334a11acd547602d6c4cf540a0f6ab5c6e",
"target": {
"file": "drivers/usb/class/usbtmc.c"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "149535209674659714067772873498026465502",
"length": 1065.0
},
"id": "CVE-2022-48834-71e685fd",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c69aef9db878ab277068a8cc1b4bf0cf309dc2b7",
"target": {
"file": "drivers/usb/class/usbtmc.c",
"function": "usbtmc_ioctl_request"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "149535209674659714067772873498026465502",
"length": 1065.0
},
"id": "CVE-2022-48834-71fc16c1",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e9b667a82cdcfe21d590344447d65daed52b353b",
"target": {
"file": "drivers/usb/class/usbtmc.c",
"function": "usbtmc_ioctl_request"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "149535209674659714067772873498026465502",
"length": 1065.0
},
"id": "CVE-2022-48834-83d016f6",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@10a805334a11acd547602d6c4cf540a0f6ab5c6e",
"target": {
"file": "drivers/usb/class/usbtmc.c",
"function": "usbtmc_ioctl_request"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"315172892409999828731882165030861670806",
"190486688488904592735555372673517806070",
"213259560541981459453165295804520928549",
"26900478183067714728917200933575810969",
"265411232992800224031593404512398698329",
"70153044305211489351156081469877560571",
"44642023498032912952463833441447050402",
"280990010770550338462797488862435419644",
"55644347917556935556966119826931618114",
"16253196083188674229321387850389778671",
"263388355776548536272999549106545262769",
"144591641446920278577517561662794417654",
"58506023433090167606199246288628404323",
"160149790736781384158979287575653824380",
"106746260799823809645752471584123217423",
"288328600606159045075107921548186474370",
"124995022956872682781637100790669716312",
"180032074369952216561151703964448441092",
"321730453154891143708249092517813328913",
"260907180297121409547851381868166181115",
"215355258347399719475156044007122718558"
]
},
"id": "CVE-2022-48834-87f1174b",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@700a0715854c1e79a73341724ce4f5bb01abc016",
"target": {
"file": "drivers/usb/class/usbtmc.c"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"315172892409999828731882165030861670806",
"190486688488904592735555372673517806070",
"213259560541981459453165295804520928549",
"26900478183067714728917200933575810969",
"265411232992800224031593404512398698329",
"70153044305211489351156081469877560571",
"44642023498032912952463833441447050402",
"280990010770550338462797488862435419644",
"55644347917556935556966119826931618114",
"16253196083188674229321387850389778671",
"263388355776548536272999549106545262769",
"144591641446920278577517561662794417654",
"58506023433090167606199246288628404323",
"160149790736781384158979287575653824380",
"106746260799823809645752471584123217423",
"288328600606159045075107921548186474370",
"124995022956872682781637100790669716312",
"180032074369952216561151703964448441092",
"321730453154891143708249092517813328913",
"260907180297121409547851381868166181115",
"215355258347399719475156044007122718558"
]
},
"id": "CVE-2022-48834-9825e173",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c69aef9db878ab277068a8cc1b4bf0cf309dc2b7",
"target": {
"file": "drivers/usb/class/usbtmc.c"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"315172892409999828731882165030861670806",
"190486688488904592735555372673517806070",
"213259560541981459453165295804520928549",
"26900478183067714728917200933575810969",
"265411232992800224031593404512398698329",
"70153044305211489351156081469877560571",
"44642023498032912952463833441447050402",
"280990010770550338462797488862435419644",
"55644347917556935556966119826931618114",
"16253196083188674229321387850389778671",
"263388355776548536272999549106545262769",
"144591641446920278577517561662794417654",
"58506023433090167606199246288628404323",
"160149790736781384158979287575653824380",
"106746260799823809645752471584123217423",
"288328600606159045075107921548186474370",
"124995022956872682781637100790669716312",
"180032074369952216561151703964448441092",
"321730453154891143708249092517813328913",
"260907180297121409547851381868166181115",
"215355258347399719475156044007122718558"
]
},
"id": "CVE-2022-48834-bb5df6d0",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5f6a2d63c68c12cf61259df7c3527a0e05dce952",
"target": {
"file": "drivers/usb/class/usbtmc.c"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "149535209674659714067772873498026465502",
"length": 1065.0
},
"id": "CVE-2022-48834-c48bba69",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@700a0715854c1e79a73341724ce4f5bb01abc016",
"target": {
"file": "drivers/usb/class/usbtmc.c",
"function": "usbtmc_ioctl_request"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"315172892409999828731882165030861670806",
"190486688488904592735555372673517806070",
"213259560541981459453165295804520928549",
"26900478183067714728917200933575810969",
"265411232992800224031593404512398698329",
"70153044305211489351156081469877560571",
"44642023498032912952463833441447050402",
"280990010770550338462797488862435419644",
"55644347917556935556966119826931618114",
"16253196083188674229321387850389778671",
"263388355776548536272999549106545262769",
"144591641446920278577517561662794417654",
"58506023433090167606199246288628404323",
"160149790736781384158979287575653824380",
"106746260799823809645752471584123217423",
"288328600606159045075107921548186474370",
"124995022956872682781637100790669716312",
"180032074369952216561151703964448441092",
"321730453154891143708249092517813328913",
"260907180297121409547851381868166181115",
"215355258347399719475156044007122718558"
]
},
"id": "CVE-2022-48834-c6989acd",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e9b667a82cdcfe21d590344447d65daed52b353b",
"target": {
"file": "drivers/usb/class/usbtmc.c"
}
}
]