nday
CVE-2021-46964

scsi: qla2xxx: Reserve extra IRQ vectors

Linux / Linux

CVE 공개: . nday가 아직 패치 근거를 수집하지 않았습니다. 패치가 없다는 뜻은 아닙니다. PoC 출처 4곳 모두 미등재. CISA KEV 미등재.

why these tags

nday derives these tags by fixed rules from the facts below; NVD, the CNA and other sources do not assign them. Vocabulary and rules: ~/tags.

NULL pointer dereference
CWE-476, stated by NVD's analysts
local
AV:L in CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H (CVSS 3.1) from NVD's analysts
no user interaction
UI:N in CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H (CVSS 3.1) from NVD's analysts
Linux kernel
affected products in the CVE record: Linux · LinuxCPE names NVD's analysts give as vulnerable: o:linux:linux_kernel
operating system
affected products in the CVE record: Linux · LinuxCPE names NVD's analysts give as vulnerable: o:linux:linux_kernelthe product type of Linux kernel in nday's product registry
현재 단계
DIS
공개
CVSS
점수 없음

생명주기

가로축 UTC. 점 = 분 단위, 넓은 막대 = 날짜만, 빈 표시 = 불명 또는 추정.
시점 알 수 없음
DIS공개
2024-02-27T18:47Z
PAT패치
아직 기록 없음
ANA분석
아직 기록 없음
POCPoC
아직 기록 없음
ITW악용
아직 기록 없음
KEVKEV
아직 기록 없음

요약

In the Linux kernel, the following vulnerability has been resolved:

scsi: qla2xxx: Reserve extra IRQ vectors

Commit a6dcfe08487e ("scsi: qla2xxx: Limit interrupt vectors to number of CPUs") lowers the number of allocated MSI-X vectors to the number of CPUs.

That breaks vector allocation assumptions in qla83xx_iospace_config(), qla24xx_enable_msix() and qla2x00_iospace_config(). Either of the functions computes maximum number of qpairs as:

ha->max_qpairs = ha->msix_count - 1 (MB interrupt) - 1 (default

response queue) - 1 (ATIO, in dual or pure target mode)

max_qpairs is set to zero in case of two CPUs and initiator mode. The number is then used to allocate ha->queue_pair_map inside qla2x00_alloc_queues(). No allocation happens and ha->queue_pair_map is left NULL but the driver thinks there are queue pairs available.

qla2xxx_queuecommand() tries to find a qpair in the map and crashes:

if (ha->mqenable) {
        uint32_t tag;
        uint16_t hwq;
        struct qla_qpair *qpair = NULL;

        tag = blk_mq_unique_tag(cmd->request);
        hwq = blk_mq_unique_tag_to_hwq(tag);
        qpair = ha->queue_pair_map[hwq]; # <- HERE

        if (qpair)
                return qla2xxx_mqueuecommand(host, cmd, qpair);
}

BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 0 P4D 0
Oops: 0000 [#1] SMP PTI
CPU: 0 PID: 72 Comm: kworker/u4:3 Tainted: G        W         5.10.0-rc1+ #25
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.0.0-prebuilt.qemu-project.org 04/01/2014
Workqueue: scsi_wq_7 fc_scsi_scan_rport [scsi_transport_fc]
RIP: 0010:qla2xxx_queuecommand+0x16b/0x3f0 [qla2xxx]
Call Trace:
 scsi_queue_rq+0x58c/0xa60
 blk_mq_dispatch_rq_list+0x2b7/0x6f0
 ? __sbitmap_get_word+0x2a/0x80
 __blk_mq_sched_dispatch_requests+0xb8/0x170
 blk_mq_sched_dispatch_requests+0x2b/0x50
 __blk_mq_run_hw_queue+0x49/0xb0
 __blk_mq_delay_run_hw_queue+0xfb/0x150
 blk_mq_sched_insert_request+0xbe/0x110
 blk_execute_rq+0x45/0x70
 __scsi_execute+0x10e/0x250
 scsi_probe_and_add_lun+0x228/0xda0
 __scsi_scan_target+0xf4/0x620
 ? __pm_runtime_resume+0x4f/0x70
 scsi_scan_target+0x100/0x110
 fc_scsi_scan_rport+0xa1/0xb0 [scsi_transport_fc]
 process_one_work+0x1ea/0x3b0
 worker_thread+0x28/0x3b0
 ? process_one_work+0x3b0/0x3b0
 kthread+0x112/0x130
 ? kthread_park+0x80/0x80
 ret_from_fork+0x22/0x30

The driver should allocate enough vectors to provide every CPU it's own HW queue and still handle reserved (MB, RSP, ATIO) interrupts.

The change fixes the crash on dual core VM and prevents unbalanced QP allocation where nr_hw_queues is two less than the number of CPUs.

Original text of the CVE record (cvelist), shown as published.

이벤트 로그

+DISCVE 공개

CVE 레코드 공개(CNA: Linux).

출처 cvelist · nday 일괄 수집 · 원본
{
  "id": 252737,
  "type": "disclosed",
  "source": "cvelist",
  "url": "https://www.cve.org/CVERecord?id=CVE-2021-46964",
  "occurred_at": "2024-02-27T18:47:02.404Z",
  "observed_at": "2026-11-13T05:37:31.591644Z",
  "is_backfill": true,
  "dedupe_key": "",
  "detail": {
    "ssvc": {
      "timestamp": "2024-09-10T16:01:34.918435Z",
      "automatable": "no",
      "exploitation": "none",
      "technical_impact": "partial"
    },
    "state": "PUBLISHED",
    "date_published": "2024-02-27T18:47:02.404Z",
    "assigner_short_name": "Linux"
  }
}

Report an error

report an error or omission

Something on this page wrong or missing? Tell the editors; if they accept it, this page's revision log says so publicly. Upstream data is not changed.

연구자 논의

최근 7일간 연구자 0명이 언급

목록의 연구자가 X에서 이 CVE를 언급한 게시물입니다. 원문 그대로 보여 주며 nday는 검증하지 않습니다.

명단의 연구자가 X에서 이 CVE를 언급한 게시물은 아직 수집되지 않았습니다.

Discussion

0 comments

No comments yet.