{"id":"CVE-2022-49159","revision":null,"records":[{"revision":"025bb36dee1345d89a90540a5b5f74e4","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2022-49159","aliases":[],"title":"scsi: qla2xxx: Implement ref count for SRB","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: qla2xxx: Implement ref count for SRB\n\nThe timeout handler and the done function are racing. When\nqla2x00_async_iocb_timeout() starts to run it can be preempted by the\nnormal response path (via the firmware?). qla24xx_async_gpsc_sp_done()\nreleases the SRB unconditionally. When scheduling back to\nqla2x00_async_iocb_timeout() qla24xx_async_abort_cmd() will access an freed\nsp->qpair pointer:\n\n  qla2xxx [0000:83:00.0]-2871:0: Async-gpsc timeout - hdl=63d portid=234500 50:06:0e:80:08:77:b6:21.\n  qla2xxx [0000:83:00.0]-2853:0: Async done-gpsc res 0, WWPN 50:06:0e:80:08:77:b6:21\n  qla2xxx [0000:83:00.0]-2854:0: Async-gpsc OUT WWPN 20:45:00:27:f8:75:33:00 speeds=2c00 speed=0400.\n  qla2xxx [0000:83:00.0]-28d8:0: qla24xx_handle_gpsc_event 50:06:0e:80:08:77:b6:21 DS 7 LS 6 rc 0 login 1|1 rscn 1|0 lid 5\n  BUG: unable to handle kernel NULL pointer dereference at 0000000000000004\n  IP: qla24xx_async_abort_cmd+0x1b/0x1c0 [qla2xxx]\n\nObvious solution to this is to introduce a reference counter. One reference\nis taken for the normal code path (the 'good' case) and one for the timeout\npath. As we always race between the normal good case and the timeout/abort\nhandler we need to serialize it. Also we cannot assume any order between\nthe handlers. Since this is slow path we can use proper synchronization via\nlocks.\n\nWhen we are able to cancel a timer (del_timer returns 1) we know there\ncan't be any error handling in progress because the timeout handler hasn't\nexpired yet, thus we can safely decrement the refcounter by one.\n\nIf we are not able to cancel the timer, we know an abort handler is\nrunning. We have to make sure we call sp->done() in the abort handlers\nbefore calling kref_put().","state":0,"publishedAt":"2025-02-26T01:55:22.021+00:00","modifiedAt":"2026-10-15T21:21:07.19+00:00","affected":[{"ecosystem":"Vendor product","name":"Linux","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"product\": \"Linux\",\n                    \"vendor\": \"Linux\",\n                    \"defaultStatus\": \"unaffected\",\n                    \"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\n                    \"programFiles\": [\n                        \"drivers/scsi/qla2xxx/qla_bsg.c\",\n                        \"drivers/scsi/qla2xxx/qla_def.h\",\n                        \"drivers/scsi/qla2xxx/qla_edif.c\",\n                        \"drivers/scsi/qla2xxx/qla_gbl.h\",\n                        \"drivers/scsi/qla2xxx/qla_gs.c\",\n                        \"drivers/scsi/qla2xxx/qla_init.c\",\n                        \"drivers/scsi/qla2xxx/qla_inline.h\",\n                        \"drivers/scsi/qla2xxx/qla_iocb.c\",\n                        \"drivers/scsi/qla2xxx/qla_mbx.c\",\n                        \"drivers/scsi/qla2xxx/qla_mid.c\",\n                        \"drivers/scsi/qla2xxx/qla_mr.c\",\n                        \"drivers/scsi/qla2xxx/qla_os.c\",\n                        \"drivers/scsi/qla2xxx/qla_target.c\"\n                    ],\n                    \"versions\": [\n                        {\n                            \"version\": \"ac280b670e6d6666667aba02324e2fc50bd96ae7\",\n                            \"lessThan\": \"e17111dd2fda81c35f309b1e5b6ab35809a375e7\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"ac280b670e6d6666667aba02324e2fc50bd96ae7\",\n                            \"lessThan\": \"e140723f78ff418c8df7d990e102e07b65c87d4a\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"ac280b670e6d6666667aba02324e2fc50bd96ae7\",\n                            \"lessThan\": \"ceda7f794f3dfe272491e93e3e93049f8be5f07b\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"ac280b670e6d6666667aba02324e2fc50bd96ae7\",\n                            \"lessThan\": \"31e6cdbe0eae37badceb5e0d4f06cf051432fd77\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        }\n                    ]\n                }"},{"ecosystem":"Vendor product","name":"Linux","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"product\": \"Linux\",\n                    \"vendor\": \"Linux\",\n                    \"defaultStatus\": \"affected\",\n                    \"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\n                    \"programFiles\": [\n                        \"drivers/scsi/qla2xxx/qla_bsg.c\",\n                        \"drivers/scsi/qla2xxx/qla_def.h\",\n                        \"drivers/scsi/qla2xxx/qla_edif.c\",\n                        \"drivers/scsi/qla2xxx/qla_gbl.h\",\n                        \"drivers/scsi/qla2xxx/qla_gs.c\",\n                        \"drivers/scsi/qla2xxx/qla_init.c\",\n                        \"drivers/scsi/qla2xxx/qla_inline.h\",\n                        \"drivers/scsi/qla2xxx/qla_iocb.c\",\n                        \"drivers/scsi/qla2xxx/qla_mbx.c\",\n                        \"drivers/scsi/qla2xxx/qla_mid.c\",\n                        \"drivers/scsi/qla2xxx/qla_mr.c\",\n                        \"drivers/scsi/qla2xxx/qla_os.c\",\n                        \"drivers/scsi/qla2xxx/qla_target.c\"\n                    ],\n                    \"versions\": [\n                        {\n                            \"version\": \"2.6.32\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \"0\",\n                            \"lessThan\": \"2.6.32\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"5.15.33\",\n                            \"lessThanOrEqual\": \"5.15.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"5.16.19\",\n                            \"lessThanOrEqual\": \"5.16.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"5.17.2\",\n                            \"lessThanOrEqual\": \"5.17.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"5.18\",\n                            \"lessThanOrEqual\": \"*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"original_commit_for_fix\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.8,"severity":"HIGH"}],"references":["https://git.kernel.org/stable/c/e17111dd2fda81c35f309b1e5b6ab35809a375e7","https://git.kernel.org/stable/c/e140723f78ff418c8df7d990e102e07b65c87d4a","https://git.kernel.org/stable/c/ceda7f794f3dfe272491e93e3e93049f8be5f07b","https://git.kernel.org/stable/c/31e6cdbe0eae37badceb5e0d4f06cf051432fd77"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2022-49159","license":"CVE Program Terms of Use","key":"cve-program:CVE-2022-49159","identifiers":["CVE-2022-49159"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-09T14:04:00.1516715+00:00","complete":true,"records":1769,"lastAttemptAt":"2026-11-09T14:04:00.1516715+00:00","lastSuccessAt":"2026-11-09T14:04:00.2969466+00:00","error":null,"lastVerifiedAt":"2026-11-09T14:04:00.2969495+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-24e6fde7b744113daefb8f6135035fb8a5c69c9617c9c0d40574a0376532ffd3-63bead6b33209140263fb436f2f7924cdf0a57ddb97fc634114a22ac37965cfc","complete":true,"records":421444,"lastAttemptAt":"2026-11-09T14:02:14.5012261+00:00","lastSuccessAt":"2026-11-09T14:02:14.4549407+00:00","error":null,"lastVerifiedAt":"2026-11-09T14:02:14.5012261+00:00","snapshotPublishedAt":"2026-11-09T13:24:52+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-4fd8047eb31a4bcbbcf88601a1c55e9e","complete":false,"records":13655,"lastAttemptAt":"2026-11-09T14:16:13.6696219+00:00","lastSuccessAt":"2026-11-09T14:16:13.665+00:00","error":"10 identifier lookups failed; latest failures include HTTP 403. Other identifiers were checked independently.","lastVerifiedAt":"2026-11-09T14:16:13.665+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13697,"expectedIdentifiers":13707,"failedIdentifiers":10},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-09T14:04:00.1516715+00:00","complete":true,"records":1096,"lastAttemptAt":"2026-11-09T14:04:00.1516715+00:00","lastSuccessAt":"2026-11-09T14:04:00.2978136+00:00","error":null,"lastVerifiedAt":"2026-11-09T14:04:00.297814+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-fec5a400f2004099a6ceb2e015ba7713","complete":true,"records":13667,"lastAttemptAt":"2026-11-09T14:04:00.8740665+00:00","lastSuccessAt":"2026-11-09T13:04:37.338+00:00","error":null,"lastVerifiedAt":"2026-11-09T13:04:37.338+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13707,"expectedIdentifiers":13707,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-980593e6977a6d1b4fb1eed5a1ffe88a468736f89f0a06f710924ad59132c023","complete":true,"records":9914,"lastAttemptAt":"2026-11-09T14:04:00.1058982+00:00","lastSuccessAt":"2026-11-08T11:07:07.068788+00:00","error":null,"lastVerifiedAt":"2026-11-09T14:04:00.1058982+00:00","snapshotPublishedAt":"2026-11-08T11:02:46+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-fde804134ecdda0ddd5ff5c26ee1fff5a6fa659311f7ef2e51c6ad54964db0e2","complete":true,"records":1971,"lastAttemptAt":"2026-11-09T14:02:14.6544671+00:00","lastSuccessAt":"2026-11-06T19:03:17.0399903+00:00","error":null,"lastVerifiedAt":"2026-11-09T14:02:14.6544671+00:00","snapshotPublishedAt":"2026-11-06T18:17:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-c905fa1bd26c7b261e77cc7202a86dc766ff31c2b096b501f3bf44f561e34970","complete":true,"records":3063,"lastAttemptAt":"2026-11-09T14:04:00.1196922+00:00","lastSuccessAt":"2026-11-09T12:02:21.7931207+00:00","error":null,"lastVerifiedAt":"2026-11-09T14:04:00.1196922+00:00","snapshotPublishedAt":"2026-11-09T11:18:00+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-0a2950eb931e2cbd521c1ee48327cd287727b9b342d55a1210c0101010ad92b5","complete":true,"records":231299,"lastAttemptAt":"2026-11-09T14:03:59.9741082+00:00","lastSuccessAt":"2026-11-09T14:03:58.6011989+00:00","error":null,"lastVerifiedAt":"2026-11-09T14:03:59.9741082+00:00","snapshotPublishedAt":"2026-11-09T13:48:25+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}