Bug 257838 - Garbage on a memory stick can cause GEOM raid taste g_raid_tr_iostart() to page-fault.
Summary: Garbage on a memory stick can cause GEOM raid taste g_raid_tr_iostart() to pa...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 13.0-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-geom (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-14 15:43 UTC by Robert Morris
Modified: 2021-10-04 20:16 UTC (History)
2 users (show)

See Also:


Attachments
Causes a kernel page fault if placed at the end of a memory stick. (160.00 KB, application/octet-stream)
2021-08-14 15:43 UTC, Robert Morris
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Morris 2021-08-14 15:43:16 UTC
Created attachment 227185 [details]
Causes a kernel page fault if placed at the end of a memory stick.

If I dd the attached data to the end of a memory stick, or run

  mdconfig -f si160.img

I get a kernel page fault on my 13.0-RELEASE-p3 machine:

GEOM_RAID: SiI-36f0f5d40c31: Array SiI-36f0f5d40c31 created.
GEOM_RAID: SiI-36f0f5d40c31: Disk md0 state changed from NONE to FAILED.
GEOM_RAID: SiI-36f0f5d40c31: Subdisk @aA¸sD|/s:0-md0 state changed from NONE to FAILED.
GEOM_RAID: SiI-36f0f5d40c31: Array started.
GEOM_RAID: SiI-36f0f5d40c31: Volume @aA¸sD|/s state changed from STARTING to SUBOPTIMAL.
GEOM_RAID: SiI-36f0f5d40c31: Provider raid/r0 for volume @aA¸sD|/s created.
GEOM_RAID: Warning! I/O request to an absent disk! [unknown][READ(offset=12642167526035968, length=-12642167526035968)]
GEOM_RAID: Warning! I/O request to an absent disk! [unknown][READ(offset=0, length=0)]
GEOM_RAID: Warning! I/O request to a disk in a wrong state (NONE)! [unknown][READ(offset=0, length=0)]
Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address   = 0x78
fault code              = supervisor write data, page not present
instruction pointer     = 0x20:0xffffffff80b618b8
stack pointer           = 0x0:0xfffffe0063d5aa80
frame pointer           = 0x0:0xfffffe0063d5aaa0
code segment            = base rx0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 725 (g_raid SiI-36f0f5d4)
trap number             = 12
panic: page fault
cpuid = 0
time = 1628953025
KDB: stack backtrace:
#0 0xffffffff80c57515 at kdb_backtrace+0x65
#1 0xffffffff80c09ef1 at vpanic+0x181
#2 0xffffffff80c09d63 at panic+0x43
#3 0xffffffff8108b1b7 at trap_fatal+0x387
#4 0xffffffff8108b20f at trap_pfault+0x4f
#5 0xffffffff8108a86d at trap+0x27d
#6 0xffffffff810619a8 at calltrap+0x8
#7 0xffffffff80b843a4 at g_raid_tr_iostart_concat+0x244
#8 0xffffffff80b62c70 at g_raid_worker+0x530
#9 0xffffffff80bc7e2e at fork_exit+0x7e
#10 0xffffffff81062a2e at fork_trampoline+0xe