DragonFlyBSD Kernel Audit
DF-1556 / run.2.log
← back to finding ↓ download raw
== DF-1556 stress run: PageLength=255 (max +936 byte overflow) ==
$ ./run.sh 255

== DF-1556 harness: missing-MIN() heap overflow in mps_config_get_raid_volume_pg0 ==
kernel Mpi2RaidVolPage0_t       = 44 (mpi2_cnfg.h:1362-1383)
kernel Mpi2RaidVol0PhysDisk_t   = 4  (mpi2_cnfg.h:1314-1321)
MPS_MAX_DISKS_IN_VOL            = 10 (mpsvar.h:106)
caller buffer size (kernel)     = 84 (=44+4*10, mps_config.c:378)
firmware PageLength             = 255
-> cm_length (PageLength*4)  = 1020

[BUGGY] bcopy(page, caller_buf, cm_length=1020) into 84-byte buffer...
overflow by 936 bytes -> write will land in guard page (PROT_NONE) -> SIGSEGV
>>> SIGSEGV/11 caught: OOB write past 84-byte caller buffer confirmed.
>>> PRIMITIVE CONFIRMED: a malicious HBA returning PageLength=255 (cm_length=1020)
    overflows the mps_wd_config_pages RAID-volume buffer by 936 bytes.
>>> This is the exact code at sys/dev/raid/mps/mps_config.c:1117 (no MIN()).
RUN_EXIT=0