FreeBSD git weekly: 2026-08-24 to 2026-08-30

Introduction

This is a display of mostly-automatically-classified git commits from 2026-08-24 to 2026-08-30.

This report is still in progress.

DEBUG: This version of the report is primarily for checking the classifiers, and therefore contains extra information (in this colour).

Table of contents and commits per category:

(0) Highlighted commits (these are copies, not in stats)
0 0.0% Userland programs
0 0.0% Documentation
0 0.0% Hardware support
0 0.0% Networking
0 0.0% System administration
2 100.0% Libraries
0 0.0% Filesystems
0 0.0% Kernel
0 0.0% Build system
0 0.0% Internal organizational stuff
0 0.0% Testing
0 0.0% Style, typos, and comments
0 0.0% Contrib code
0 0.0% Reverted commits
0 0.0% Unclassified commits
2 100% total
Technical notes about this page

debug: info about the automatic classification

num % num changed stage
2 100.0% 0 04-filenames_plain2
0 0.0% 0 Manually-classified commits
0 0.0% 0 Unclassified commits

debug: more stats

num % stage
0 0.0% Misclassified commits
2 100.0% Classified commits, no corrections

debug: groups

0 0.0% num in revert
0 0.0% num in fixes
0 0.0% num in consecutive
0 0.0% Commits in groups

Highlighted commits

For extra visibility, these are copies of commits found in other sections. Most (if not all) come from the commit message containing "Relnotes:", or commits modifying UPDATING.

-- no commits in this category this week --

Userland programs

Commits about commands found in man section 1 (other than networking).

-- no commits in this category this week --

Documentation

Man pages, release notes, etc.

-- no commits in this category this week --

Hardware support

Hardware drivers and architecture-specific code.

-- no commits in this category this week --

Networking

Network-related commands, library, and kernel.

-- no commits in this category this week --

System administration

Stuff in man section 8 (other than networking).

-- no commits in this category this week --

Libraries

libusb: Fix NULL dereference when a hotplug callback deregisters itself
libusb_hotplug_register_callback() runs the newly registered callback
over the already-enumerated device list when LIBUSB_HOTPLUG_ENUMERATE
is set.  A hotplug callback returning non-zero means "deregister me",
and the enumerate loop honours that by freeing the handle and setting
it to NULL.

Since commit 6bda9f26d2ed changed libusb_hotplug_callback_handle from a
pointer to an int, the tail of the function unconditionally dereferences
that handle, so any caller that passes LIBUSB_HOTPLUG_ENUMERATE, a
non-NULL handle pointer, and a callback that returns non-zero on a
matching device crashes inside libusb.  This is a normal usage pattern
and it was safe before the conversion, when the equivalent line simply
stored NULL.

Report the reserved id 0 instead.  The allocator hands out ids starting
at 1, and libusb_hotplug_deregister_callback() already ignores 0, so
this restores the pre-conversion behaviour.

Signed-off-by: yuvrajnode <yuvrajsinghrock1221@gmail.com>
Reviewed by:    aokblast
Fixes:  https://cgit.freebsd.org/src/commit/?id=6bda9f26d2ed ("libusb: change callback register handler to int")
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2383
Closes:         https://github.com/freebsd/freebsd-src/pull/2383
fc3e8434a61f372b4d6ec6bd8910ac8cd54b9b37 yuvrajnode 2026-08-23 07:15:49

debug: classified in 04-filenames_plain2 by 'lib/'

libusb: Validate arguments before dereferencing the hotplug context
libusb_hotplug_register_callback() resolves its context with
GET_CONTEXT() and then immediately reads ctx->no_discovery and
ctx->usb_event_mode, but only checks "ctx == NULL" afterwards.

GET_CONTEXT() falls back to usbi_default_context, which is NULL before
libusb_init() and is reset to NULL by libusb_exit().  An application
that calls libusb_hotplug_register_callback(NULL, ...) without an
initialised default context therefore crashes on the ctx->no_discovery
read, instead of getting the LIBUSB_ERROR_INVALID_PARAM the existing
guard was clearly written to return.

Move the argument validation ahead of the first dereference.  None of
the validated arguments depend on the context, so no other ordering
constraint is affected.

Signed-off-by: yuvrajnode <yuvrajsinghrock1221@gmail.com>
Reviewed by:    aokblast
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2384
Closes:         https://github.com/freebsd/freebsd-src/pull/2384
1c2263b683977ebab3d9a6448268ad810ceeec70 yuvrajnode 2026-08-23 07:15:49

debug: classified in 04-filenames_plain2 by 'lib/'

Filesystems

-- no commits in this category this week --

Kernel

Kernel stuff (other than networking, filesystems, and drivers).

-- no commits in this category this week --

Build system

-- no commits in this category this week --

Internal organizational stuff

-- no commits in this category this week --

Testing

-- no commits in this category this week --

Style, typos, and comments

These could go in other categories, but it's more clear if they're here instead.

-- no commits in this category this week --

Contrib code

-- no commits in this category this week --

Reverted commits

-- no commits in this category this week --

Unclassified commits

Not classified automatically, and waiting for manual attention.

-- no commits in this category this week --

Technical notes

Dates:

Automatic grouping:

Automatic categories:

Source code:


Generated with commits-periodical 0.20 at 2026-08-24 01:49:35+00:00.

This work is supported by Tarsnap Backup Inc.

Alternate version: 2026-08-24 (release)