Download raw body.
Kirill A. Korinsky <kirill@korins.ky> wrote: > my update libfido accidently reverted a hardcoded USB device metadata which > leads broken pledge in, for example, chromium. I'm more willing to allow pledge to reach ioctl USB_GET_DEVICEINFO, if there are some incremental safety improvements made to the kernel code that is reached. I think usbd_fill_deviceinfo() should return int, look carefully at what it is going to provide to userland, and return an error if the usb configuration is not sane. But first, I think we should purge old data in the structure. Index: usb_subr.c =================================================================== RCS file: /cvs/src/sys/dev/usb/usb_subr.c,v diff -u -p -u -r1.167 usb_subr.c --- usb_subr.c 15 Aug 2026 22:06:40 -0000 1.167 +++ usb_subr.c 7 Sep 2026 18:36:54 -0000 @@ -1298,6 +1298,7 @@ usbd_fill_deviceinfo(struct usbd_device struct usbd_port *p; int i; + memset(di, 0, sizeof(*di)); di->udi_bus = dev->bus->usbctl->dv_unit; di->udi_addr = dev->address; strlcpy(di->udi_vendor, dev->vendor, sizeof(di->udi_vendor));