Kernel bugs
Kernel bugs found along the way
Writing drivers means reading a lot of kernel code and crashing a lot of boards. Some of the crashes came from FreeBSD itself. Each one gets a page here.
Every entry says where the bug lives, how it showed up, what the workaround is, and whether it has been reported. "Drafted" means the report is written but not yet filed; the draft sits in the driver's repository. The list of everything filed is on Upstream reports.
Several of these were analysed with help from an AI assistant and then checked line by line against the FreeBSD source. The drafts say so, and the reports will too.
Routes stay in the old FIB after an interface moves or is destroyed
After ifconfig IF fib N, the interface's prefix and loopback routes stay in the old FIB, survive interface destruction, and block re-adding the address.
ng_hci: NULL pointer dereference in the event handler
Host tests of the Raspberry Pi Bluetooth driver found a NULL pointer dereference in FreeBSD's HCI event code at ng_hci_evnt.c:972.
ucom(4): hw.usb.ucom.cons_unit from loader.conf never makes a console
Setting hw.usb.ucom.cons_unit in loader.conf does not make a USB serial adapter an active console; only conscontrol from userland does. The tunables are also undocumented.
watchdog(4): the software watchdog ignores its own timeout action
The software watchdog's timeout callback reads the hardware timeout action instead of the one set with WDIOC_SETSOFTTIMEOUTACT. Unchanged since 2013.
watchdogd(8): the pretimeout option passes 4 bytes to an 8-byte ioctl
Since the watchdog moved to sbintime_t, watchdogd still passes a u_int of seconds to WDIOC_SETPRETIMEOUT, so the kernel reads 4 bytes of whatever follows.
uart_pl011: no baud clock on Raspberry Pi, no RTS/CTS
uart_pl011 never writes the baud divisor on Raspberry Pi because it does not read the clocks property, and it has no hardware flow control. This blocks on-board Bluetooth.
net80211: TKIP MIC setters overwrite the start of the key
On FreeBSD main, ieee80211_crypto_set_key_{tx,rx}mic_data() zero the first 8 bytes of the TKIP key instead of the MIC key. 15.x is not affected.
BCM2711: SD card writes hang when the Wi-Fi SDHCI controller interrupts
On the Raspberry Pi 4 the Wi-Fi and SD card controllers share one interrupt. An Arasan interrupt during an SD DMA write loses the write and the board reboots.
i915: GTT mmap version 5 on FreeBSD 15.1 causes GPU hangs
drm-612-kmod 6.12.85 reports GTT mmap version 5 on FreeBSD 15.1 because of a version check, Mesa switches path, and Intel GPUs hang. Fixed in drm-kmod.
Page fault in in6_selecthlim() after iwlwifi detaches
A TCP retransmit timer fires after the Wi-Fi interface is gone and in6_selecthlim() dereferences its missing IPv6 data. Seen on a Dell XPS 13 with an AX210.
ig4: LPSS I2C controllers never attach on Haswell and Broadwell
Missing _PS0, the wrong controller class and a gated clock kept ACPI-enumerated LPSS I2C controllers off, hiding I2C touchpads. Fixed upstream in PR 298558.
atkbdc(4) has no resume method
The i8042 keyboard controller is not reconfigured after S3 resume, so a PS/2 touchpad behind it disappears. Seen on a Dell XPS 13 9343.