In the Linux kernel, the following vulnerability has been resolved:
net: asix: add proper error handling of usb read errors
Syzbot once again hit uninit value in asix driver. The problem still the same -- asixreadcmd() reads less bytes, than was requested by caller.
Since all read requests are performed via asixreadcmd() let's catch usb related error there and add _mustcheck notation to be sure all callers actually check return value.
So, this patch adds sanity check inside asixreadcmd(), that simply checks if bytes read are not less, than was requested and adds missing error handling of asixreadcmd() all across the driver code.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49226.json"
}[
{
"signature_type": "Line",
"deprecated": false,
"id": "CVE-2022-49226-0026650b",
"target": {
"file": "drivers/net/usb/asix_devices.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"60604756943237725253677468564639154885",
"272475573824939403710351873585107829611",
"20324404785676293345873777662495532381",
"176793043986298169681462780280880668365",
"200440793862497269518802030866707401428",
"255826282608760194903043333126090866236",
"88374148554349175107692977757688935159",
"113449779404404139212682925946616985568",
"316700946401036451374606297646304575739",
"69992035463160489153401089971827938222",
"241223405280659846956899882560935017898"
]
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@920a9fa27e7805499cfe78491b36fed2322c02ec"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49226-0c65da2a",
"target": {
"file": "drivers/net/usb/asix_devices.c",
"function": "ax88772_bind"
},
"digest": {
"length": 1916.0,
"function_hash": "260304746102896809303141304327217440688"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9ea8d2fca8fea3b17005b4dc02f8ef15f7a2fb97"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49226-11bafd47",
"target": {
"file": "drivers/net/usb/asix_common.c",
"function": "asix_mdio_read_nopm"
},
"digest": {
"length": 579.0,
"function_hash": "46314927152408738120223817098494762928"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@920a9fa27e7805499cfe78491b36fed2322c02ec"
},
{
"signature_type": "Line",
"deprecated": false,
"id": "CVE-2022-49226-18121a1b",
"target": {
"file": "drivers/net/usb/asix.h"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"131943846843477513026253242748314500019",
"142456918953720145573712040894091435706",
"172122813165189085820812471194015405975",
"22953320310525601778868451703827238722",
"38644900709672850614474847981317748716"
]
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@920a9fa27e7805499cfe78491b36fed2322c02ec"
},
{
"signature_type": "Line",
"deprecated": false,
"id": "CVE-2022-49226-252859f6",
"target": {
"file": "drivers/net/usb/asix_common.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"215864971250448420702198162381473484166",
"155897448423858508180878294276672405162",
"186115678209386790150462973515422021041",
"278722383418844256146314371890692904485",
"310165482915402143967929085751326703321",
"204346576457350969545903424572388465648",
"331946608115796790825779876969223650252",
"261796642541841538176824049465118880519",
"121197455610079396812974444692639014583",
"1505221702531330192937809932515427913",
"106055133402852531493863842584777954853",
"105020731976871923204422816611485500279",
"146282606367781097279835431770667588516",
"274245352569098492708833154102648925859",
"272735564258597209157555937982896371641",
"124713412560305102193257992350262942707",
"19785885425562142176390747630095455583",
"211229813843140354539676062587317024041"
]
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b96a7265f763b37ff3138b9ca8122a950f13b00e"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49226-25818607",
"target": {
"file": "drivers/net/usb/asix_common.c",
"function": "asix_check_host_enable"
},
"digest": {
"length": 504.0,
"function_hash": "61334275557031946813601919180283209492"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@920a9fa27e7805499cfe78491b36fed2322c02ec"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49226-2ebbf027",
"target": {
"file": "drivers/net/usb/asix_common.c",
"function": "asix_check_host_enable"
},
"digest": {
"length": 504.0,
"function_hash": "61334275557031946813601919180283209492"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b96a7265f763b37ff3138b9ca8122a950f13b00e"
},
{
"signature_type": "Line",
"deprecated": false,
"id": "CVE-2022-49226-3677e9b2",
"target": {
"file": "drivers/net/usb/asix_common.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"215864971250448420702198162381473484166",
"155897448423858508180878294276672405162",
"186115678209386790150462973515422021041",
"278722383418844256146314371890692904485",
"310165482915402143967929085751326703321",
"204346576457350969545903424572388465648",
"331946608115796790825779876969223650252",
"261796642541841538176824049465118880519",
"121197455610079396812974444692639014583",
"1505221702531330192937809932515427913",
"106055133402852531493863842584777954853",
"105020731976871923204422816611485500279",
"146282606367781097279835431770667588516",
"274245352569098492708833154102648925859",
"272735564258597209157555937982896371641",
"124713412560305102193257992350262942707",
"19785885425562142176390747630095455583",
"211229813843140354539676062587317024041"
]
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@920a9fa27e7805499cfe78491b36fed2322c02ec"
},
{
"signature_type": "Line",
"deprecated": false,
"id": "CVE-2022-49226-3a4f0ccf",
"target": {
"file": "drivers/net/usb/asix.h"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"131943846843477513026253242748314500019",
"142456918953720145573712040894091435706",
"172122813165189085820812471194015405975",
"22953320310525601778868451703827238722",
"38644900709672850614474847981317748716"
]
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9ea8d2fca8fea3b17005b4dc02f8ef15f7a2fb97"
},
{
"signature_type": "Line",
"deprecated": false,
"id": "CVE-2022-49226-3cda7ed7",
"target": {
"file": "drivers/net/usb/asix.h"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"131943846843477513026253242748314500019",
"142456918953720145573712040894091435706",
"172122813165189085820812471194015405975",
"22953320310525601778868451703827238722",
"38644900709672850614474847981317748716"
]
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b96a7265f763b37ff3138b9ca8122a950f13b00e"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49226-4a316d58",
"target": {
"file": "drivers/net/usb/asix_common.c",
"function": "asix_read_cmd"
},
"digest": {
"length": 567.0,
"function_hash": "332281504313201198198138668709088021947"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@662ff765470ad0d11a1153d6d8e99d69a98e60b4"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49226-532cd119",
"target": {
"file": "drivers/net/usb/asix_devices.c",
"function": "ax88178_reset"
},
"digest": {
"length": 2359.0,
"function_hash": "18143048146190792080405401862447784118"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b96a7265f763b37ff3138b9ca8122a950f13b00e"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49226-544d2692",
"target": {
"file": "drivers/net/usb/asix_common.c",
"function": "asix_mdio_read_nopm"
},
"digest": {
"length": 579.0,
"function_hash": "46314927152408738120223817098494762928"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9ea8d2fca8fea3b17005b4dc02f8ef15f7a2fb97"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49226-67a5b9eb",
"target": {
"file": "drivers/net/usb/asix_devices.c",
"function": "ax88178_reset"
},
"digest": {
"length": 2359.0,
"function_hash": "18143048146190792080405401862447784118"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@920a9fa27e7805499cfe78491b36fed2322c02ec"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49226-6f72650a",
"target": {
"file": "drivers/net/usb/asix_common.c",
"function": "asix_read_cmd"
},
"digest": {
"length": 567.0,
"function_hash": "332281504313201198198138668709088021947"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9ea8d2fca8fea3b17005b4dc02f8ef15f7a2fb97"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49226-73eb5b0a",
"target": {
"file": "drivers/net/usb/asix_devices.c",
"function": "ax88178_reset"
},
"digest": {
"length": 2359.0,
"function_hash": "18143048146190792080405401862447784118"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@662ff765470ad0d11a1153d6d8e99d69a98e60b4"
},
{
"signature_type": "Line",
"deprecated": false,
"id": "CVE-2022-49226-7cae6eff",
"target": {
"file": "drivers/net/usb/asix_common.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"215864971250448420702198162381473484166",
"155897448423858508180878294276672405162",
"186115678209386790150462973515422021041",
"278722383418844256146314371890692904485",
"310165482915402143967929085751326703321",
"204346576457350969545903424572388465648",
"331946608115796790825779876969223650252",
"261796642541841538176824049465118880519",
"121197455610079396812974444692639014583",
"1505221702531330192937809932515427913",
"106055133402852531493863842584777954853",
"105020731976871923204422816611485500279",
"146282606367781097279835431770667588516",
"274245352569098492708833154102648925859",
"272735564258597209157555937982896371641",
"124713412560305102193257992350262942707",
"19785885425562142176390747630095455583",
"211229813843140354539676062587317024041"
]
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@662ff765470ad0d11a1153d6d8e99d69a98e60b4"
},
{
"signature_type": "Line",
"deprecated": false,
"id": "CVE-2022-49226-84aaacc8",
"target": {
"file": "drivers/net/usb/asix.h"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"131943846843477513026253242748314500019",
"142456918953720145573712040894091435706",
"172122813165189085820812471194015405975",
"22953320310525601778868451703827238722",
"38644900709672850614474847981317748716"
]
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@662ff765470ad0d11a1153d6d8e99d69a98e60b4"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49226-85ff033c",
"target": {
"file": "drivers/net/usb/asix_devices.c",
"function": "ax88772_bind"
},
"digest": {
"length": 1916.0,
"function_hash": "260304746102896809303141304327217440688"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@920a9fa27e7805499cfe78491b36fed2322c02ec"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49226-8e4213cd",
"target": {
"file": "drivers/net/usb/asix_common.c",
"function": "asix_check_host_enable"
},
"digest": {
"length": 504.0,
"function_hash": "61334275557031946813601919180283209492"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9ea8d2fca8fea3b17005b4dc02f8ef15f7a2fb97"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49226-a8231f63",
"target": {
"file": "drivers/net/usb/asix_devices.c",
"function": "ax88772_bind"
},
"digest": {
"length": 1916.0,
"function_hash": "260304746102896809303141304327217440688"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b96a7265f763b37ff3138b9ca8122a950f13b00e"
},
{
"signature_type": "Line",
"deprecated": false,
"id": "CVE-2022-49226-b4a2fd64",
"target": {
"file": "drivers/net/usb/asix_devices.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"60604756943237725253677468564639154885",
"272475573824939403710351873585107829611",
"20324404785676293345873777662495532381",
"176793043986298169681462780280880668365",
"200440793862497269518802030866707401428",
"255826282608760194903043333126090866236",
"88374148554349175107692977757688935159",
"113449779404404139212682925946616985568",
"316700946401036451374606297646304575739",
"69992035463160489153401089971827938222",
"241223405280659846956899882560935017898"
]
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b96a7265f763b37ff3138b9ca8122a950f13b00e"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49226-b4af622a",
"target": {
"file": "drivers/net/usb/asix_devices.c",
"function": "ax88772_bind"
},
"digest": {
"length": 1916.0,
"function_hash": "260304746102896809303141304327217440688"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@662ff765470ad0d11a1153d6d8e99d69a98e60b4"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49226-b50f056f",
"target": {
"file": "drivers/net/usb/asix_devices.c",
"function": "ax88178_reset"
},
"digest": {
"length": 2359.0,
"function_hash": "18143048146190792080405401862447784118"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9ea8d2fca8fea3b17005b4dc02f8ef15f7a2fb97"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49226-ba64aa32",
"target": {
"file": "drivers/net/usb/asix_common.c",
"function": "asix_mdio_read_nopm"
},
"digest": {
"length": 579.0,
"function_hash": "46314927152408738120223817098494762928"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b96a7265f763b37ff3138b9ca8122a950f13b00e"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49226-c0b8dc64",
"target": {
"file": "drivers/net/usb/asix_common.c",
"function": "asix_read_cmd"
},
"digest": {
"length": 567.0,
"function_hash": "332281504313201198198138668709088021947"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@920a9fa27e7805499cfe78491b36fed2322c02ec"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49226-c3369a77",
"target": {
"file": "drivers/net/usb/asix_common.c",
"function": "asix_read_cmd"
},
"digest": {
"length": 567.0,
"function_hash": "332281504313201198198138668709088021947"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b96a7265f763b37ff3138b9ca8122a950f13b00e"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49226-c58cf16f",
"target": {
"file": "drivers/net/usb/asix_common.c",
"function": "asix_mdio_read_nopm"
},
"digest": {
"length": 579.0,
"function_hash": "46314927152408738120223817098494762928"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@662ff765470ad0d11a1153d6d8e99d69a98e60b4"
},
{
"signature_type": "Line",
"deprecated": false,
"id": "CVE-2022-49226-cd698c0a",
"target": {
"file": "drivers/net/usb/asix_common.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"215864971250448420702198162381473484166",
"155897448423858508180878294276672405162",
"186115678209386790150462973515422021041",
"278722383418844256146314371890692904485",
"310165482915402143967929085751326703321",
"204346576457350969545903424572388465648",
"331946608115796790825779876969223650252",
"261796642541841538176824049465118880519",
"121197455610079396812974444692639014583",
"1505221702531330192937809932515427913",
"106055133402852531493863842584777954853",
"105020731976871923204422816611485500279",
"146282606367781097279835431770667588516",
"274245352569098492708833154102648925859",
"272735564258597209157555937982896371641",
"124713412560305102193257992350262942707",
"19785885425562142176390747630095455583",
"211229813843140354539676062587317024041"
]
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9ea8d2fca8fea3b17005b4dc02f8ef15f7a2fb97"
},
{
"signature_type": "Line",
"deprecated": false,
"id": "CVE-2022-49226-e17d30e1",
"target": {
"file": "drivers/net/usb/asix_devices.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"60604756943237725253677468564639154885",
"272475573824939403710351873585107829611",
"20324404785676293345873777662495532381",
"176793043986298169681462780280880668365",
"200440793862497269518802030866707401428",
"255826282608760194903043333126090866236",
"88374148554349175107692977757688935159",
"113449779404404139212682925946616985568",
"316700946401036451374606297646304575739",
"69992035463160489153401089971827938222",
"241223405280659846956899882560935017898"
]
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9ea8d2fca8fea3b17005b4dc02f8ef15f7a2fb97"
},
{
"signature_type": "Line",
"deprecated": false,
"id": "CVE-2022-49226-f034f911",
"target": {
"file": "drivers/net/usb/asix_devices.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"60604756943237725253677468564639154885",
"272475573824939403710351873585107829611",
"20324404785676293345873777662495532381",
"176793043986298169681462780280880668365",
"200440793862497269518802030866707401428",
"255826282608760194903043333126090866236",
"88374148554349175107692977757688935159",
"113449779404404139212682925946616985568",
"316700946401036451374606297646304575739",
"69992035463160489153401089971827938222",
"241223405280659846956899882560935017898"
]
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@662ff765470ad0d11a1153d6d8e99d69a98e60b4"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49226-fe532097",
"target": {
"file": "drivers/net/usb/asix_common.c",
"function": "asix_check_host_enable"
},
"digest": {
"length": 504.0,
"function_hash": "61334275557031946813601919180283209492"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@662ff765470ad0d11a1153d6d8e99d69a98e60b4"
}
]
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49226.json"