🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: muc.lists.freebsd.fs
1 messages
1 total messages Started by bugzilla-noreply Sat, 21 Nov 2026 11:27
[Bug 300950] corrupted floppy disk causes kernel panic
#59
Author: bugzilla-noreply
Date: Sat, 21 Nov 2026 11:27
43 lines
3311 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=300950

--- Comment #1 from Federico Angelilli <code@fedang.net> ---
Consistent failure when IO fails on sector 19 onward (track 2). In this case
caused by a corrupted track mark on the floppy.

The read of the rootdir fails, thus failing to set the mp->mnt_data. Subsequent
mnt update operation derefenced that very mnt_data without checking and caused
the crash.

Here is a synthetic disk image to repro:

cat badfloppy.sh
#!/bin/sh

truncate -s 1474560 floppy.img
mdconfig -a -t vnode -f floppy.img -u 10
newfs_msdos -f 1440 /dev/md10
mdconfig -d -u 10

# Split at sector 19 (9728 bytes):
#    part1 = boot sector (0) + FAT1 (1..9) + FAT2 (10..18)
#    part2 = root directory (19..32) + data area (33..2879)
dd if=floppy.img of=part1.img bs=512 count=19
dd if=floppy.img of=part2.img

# Attach both halves and inject 100% EIO on reads to part2
mdconfig -a -t vnode -f part1.img -u 10
mdconfig -a -t vnode -f part2.img -u 11
kldload geom_nop geom_concat
gnop create -r 100 /dev/md11
gconcat create badfloppy /dev/md10 /dev/md11.nop

-- 
You are receiving this mail because:
You are the assignee for the bug.

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads