28 May 2024 to 1 June 2024
University of Ottawa
EST timezone

USB Debug Capability on FreeBSD, Revised

31 May 2024, 11:15
1h
Desmarais 1120 (University of Ottawa)

Desmarais 1120

University of Ottawa

Lecture 50 min Development Talks: Room 1120 - Friday

Speaker

Hiroki Sato (Tokyo Institute of Technology)

Description

USB Debug Capability (DbC) is a standardized functionality in Host Controller Interface of USB 2.x and 3.x. It is a hardware-level circuitry available as a hidden serial communication channel that can work even with no operating system support and is supposed to be an out-of-band access endpoint for debugging. When a kernel panic occurs, we cannot get debugger access on laptops or consumer-grade motherboards with no physical serial port. USB DbC can be used even in that situation and is greatly helpful for kernel development. For non-developers, this can be used to get login access when the system has a wrong network configuration and to transfer data over a USB cable directly attached between two machines.

This talk covers the technical details of how DbC works, an implementation for FreeBSD, and how to use it. This is an extended version of my talk held at EuroBSDcon 2023 (the slides are available at https://people.allbsd.org/~hrs/FreeBSD/udbc/sato-20230916-usbdbc.pdf). While only a proof-of-concept implementation using UEFI and FreeBSD client driver was demonstrated then, this talk will show and explain a fully working serial console driver, some other implementations to utilize USB DbC, and discuss security implications. This implementation should also be available in the FreeBSD source tree before BSDCan. If time permits, drivers for NetBSD and OpenBSD will also be covered.

Primary author

Hiroki Sato (Tokyo Institute of Technology)

Presentation materials

There are no materials yet.