Vulnerability · Published Sep 4, 2024 · Assigned by Linux

CVE-2024-44976ata: pata_macio: Fix DMA table overflow

Medium 5.5

In plain English

A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 9% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)5.5Medium
Exploit odds (30 days)0.2%top 90.7% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

In the Linux kernel, the following vulnerability has been resolved: ata: pata_macio: Fix DMA table overflow Kolbjørn and Jonáš reported that their 32-bit PowerMacs were crashing in pata-macio since commit 09fe2bfa6b83 ("ata: pata_macio: Fix max_segment_size with PAGE_SIZE == 64K"). For example: kernel BUG at drivers/ata/pata_macio.c:544! Oops: Exception in kernel mode, sig: 5 [#1] BE PAGE_SIZE=4K MMU=Hash SMP NR_CPUS=2 DEBUG_PAGEALLOC PowerMac ... NIP pata_macio_qc_prep+0xf4/0x190 LR pata_macio_qc_prep+0xfc/0x190 Call Trace: 0xc1421660 (unreliable) ata_qc_issue+0x14c/0x2d4 __ata_scsi_queuecmd+0x200/0x53c ata_scsi_queuecmd+0x50/0xe0 scsi_queue_rq+0x788/0xb1c __blk_mq_issue_directly+0x58/0xf4 blk_mq_plug_issue_direct+0x8c/0x1b4 blk_mq_flush_plug_list.part.0+0x584/0x5e0 __blk_flush_plug+0xf8/0x194 __submit_bio+0x1b8/0x2e0 submit_bio_noacct_nocheck+0x230/0x304 btrfs_work_helper+0x200/0x338 process_one_work+0x1a8/0x338 worker_thread+0x364/0x4c0 kthread+0x100/0x104 start_kernel_thread+0x10/0x14 That commit increased max_segment_size to 64KB, with the justification that the SCSI core was already using that size when PAGE_SIZE == 64KB, and that there was existing logic to split over-sized requests. However with a sufficiently large request, the splitting logic causes each sg to be split into two commands in the DMA table, leading to overflow of the DMA table, triggering the BUG_ON(). With default settings the bug doesn't trigger, because the request size is limited by max_sectors_kb == 1280, however max_sectors_kb can be increased, and apparently some distros do that by default using udev rules. Fix the bug for 4KB kernels by reverting to the old max_segment_size. For 64KB kernels the sg_tablesize needs to be halved, to allow for the possibility that each sg will be split into two.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:13linux6.10.7-1DEBIAN-CVE-2024-44976
Debian:14linux6.10.7-1DEBIAN-CVE-2024-44976
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-intel-iot-realtimeno fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2024-44976
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2024-44976
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2024-44976

Affected products (as reported)

VendorProductVersions
Linux Linux 09fe2bfa6b83f865126ce3964744863f69a4a030 – before 709e4c8f78e156ab332297bdd87527ec3da4e2d409fe2bfa6b83f865126ce3964744863f69a4a030 – before 822c8020aebcf5804a143b891e34f29873fee5e2
Linux Linux 6.10

References