β¬’ DragonFlyBSD Kernel Audit
← triage Β· dashboard
DF-2892

alignment==0 passes the power-of-two check but means 'physical address 0' β€” guaranteed allocation failure after three full page-queue flush passes; plus copy-paste panic string in contigfree

Field Value
ID DF-2892
Status new
Severity Info
CVSS 3.1 CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:N
CWE CWE-20 Improper Input Validation
File sys/vm/vm_contig.c
Lines 268-269, 314, 594
Area vm
Confidence likely
Discovered 2026-09-02
Pass 2 (GLM 5.3 second pass)
Bucket base:vm
Reported pending
Known CVE none
CVE match novel

Summary

(alignment & (alignment-1)) != 0 accepts alignment==0, but the scan then requires (phys & (alignment-1)) == 0 == phys == 0 β€” never free on real hardware. A caller passing 0 in the "no constraint" sense gets a deterministic failure that first runs three full passes of vm_contig_pg_clean over all 1024 inactive queues (and with M_WAITOK the active queues β€” "very, very slow"), stalling every contigmalloc caller including M_NOWAIT ones. boundary==0 is likewise accepted but harmless. Separately contigfree's zero-size panic names the wrong function ('vm_contig_pg_kmap' at :594). No in-tree caller passes 0 (all pass PAGE_SIZE/16/order-derived) β€” hardening. Fix: reject alignment==0 explicitly + fix the panic string.

Timeline

  • 2026-09-02 Discovered during pass-2 audit of vm_contig.c (GLM 5.3).

Discussion (0)

No comments yet.