Page MenuHomeFreeBSD

kevans (Kyle Evans)
User

Projects (12)

User Details

User Since
Oct 2 2015, 1:17 PM (566 w, 4 d)

Recent Activity

Today

kevans added a comment to D58779: sound: uaudio: discard hardware sidetone feature units.

Ah, vol is neutralized because of that mixer #36. It defaults to ctl == 0 from the struct being zero-init, so we don't create the synthetic vol parent from the pcm feature unit. I don't have enough hardware available to feel confident about poking that hornet's nest.

Tue, Aug 11, 3:42 AM
kevans retitled D58779: sound: uaudio: discard hardware sidetone feature units from sound: uaudio: recognize hardware sidetone as imix to sound: uaudio: discard hardware sidetone feature units.
Tue, Aug 11, 2:57 AM
kevans updated the summary of D58779: sound: uaudio: discard hardware sidetone feature units.
Tue, Aug 11, 2:56 AM
kevans requested review of D58779: sound: uaudio: discard hardware sidetone feature units.
Tue, Aug 11, 2:54 AM
kevans committed rG135df7785431: usb: xhci: allow up to 1s for SET_ADDRESS (authored by kevans).
usb: xhci: allow up to 1s for SET_ADDRESS
Tue, Aug 11, 1:27 AM
kevans closed D58717: usb: xhci: allow up to 1s for SET_ADDRESS.
Tue, Aug 11, 1:27 AM

Yesterday

kevans requested review of D58771: userboot: bump the interface to v6, add an accept_interpreter callback.
Mon, Aug 10, 8:54 PM
kevans added a comment to D58706: tty: do not recurse on ttydev_close().

Writing a test for this seems to be a little harder than I anticipated, but I'm also wondering now if deleting the knotes was infact the right thing to do. From revoke(2):

Mon, Aug 10, 7:13 PM
kevans added inline comments to D58737: ether_gen_addr(9): fix `OUI_FREEBSD_BASE` description.
Mon, Aug 10, 12:48 AM

Sun, Aug 9

kevans added inline comments to D58737: ether_gen_addr(9): fix `OUI_FREEBSD_BASE` description.
Sun, Aug 9, 5:47 PM

Sat, Aug 8

kevans requested review of D58717: usb: xhci: allow up to 1s for SET_ADDRESS.
Sat, Aug 8, 4:50 AM
kevans committed rG8befc9e8b194: kern: fix oversight in security.bsd.unprivileged_kenv_read (authored by kevans).
kern: fix oversight in security.bsd.unprivileged_kenv_read
Sat, Aug 8, 4:11 AM

Fri, Aug 7

kevans added a comment to D58706: tty: do not recurse on ttydev_close().

I'll look at adding a test for this scenario, and will take a closer look at this in a few hours

Fri, Aug 7, 11:18 PM
kevans committed rG4f42ec2f38ee: prometheus_sysctl_exporter: don't abort on bad labels (authored by kevans).
prometheus_sysctl_exporter: don't abort on bad labels
Fri, Aug 7, 1:55 AM
kevans closed D57983: prometheus_sysctl_exporter: don't abort on bad labels.
Fri, Aug 7, 1:54 AM
kevans committed rG6ce4a4dea4df: stdio: *memstream: grow the buffer by 1.5x on write (authored by kevans).
stdio: *memstream: grow the buffer by 1.5x on write
Fri, Aug 7, 1:49 AM
kevans committed rG3d29c3a3ec99: stdio: *memstream: decouple the buffer size from the stream length (authored by kevans).
stdio: *memstream: decouple the buffer size from the stream length
Fri, Aug 7, 1:49 AM
kevans committed rGc675e0710ea6: stdio: *memstream: slightly streamline growth function (authored by kevans).
stdio: *memstream: slightly streamline growth function
Fri, Aug 7, 1:49 AM
kevans committed rG10904e0c2b4c: hid: u2f: stop interrupts on last-close (authored by kevans).
hid: u2f: stop interrupts on last-close
Fri, Aug 7, 1:49 AM
kevans committed rGa76cac3a2062: usbdump: add -t to omit timestamps (authored by kevans).
usbdump: add -t to omit timestamps
Fri, Aug 7, 1:49 AM
kevans committed rG1ce0ad4b3aa5: rockchip: fix stack overflow in rk8xx_rtc (authored by kevans).
rockchip: fix stack overflow in rk8xx_rtc
Fri, Aug 7, 1:49 AM
kevans committed rG29a68ae63cac: kern: syscall_thread_enter() cannot fail (authored by kevans).
kern: syscall_thread_enter() cannot fail
Fri, Aug 7, 1:49 AM
kevans committed rGf58af5d9c538: kern: osd: trash a slot's methods upon deregistration (authored by kevans).
kern: osd: trash a slot's methods upon deregistration
Fri, Aug 7, 1:49 AM
kevans committed rG240bd2eeb21f: evdev: use a prometheus-safe label for ev_sysctl_tree (authored by kevans).
evdev: use a prometheus-safe label for ev_sysctl_tree
Fri, Aug 7, 1:49 AM
kevans committed rGf7d84c7b3858: evdev: add devnum sysctl (authored by quentin.thebault_defenso.fr).
evdev: add devnum sysctl
Fri, Aug 7, 1:49 AM
kevans committed rG3e0270c52875: kern: osd: abstract away the math for locating a slot method (authored by kevans).
kern: osd: abstract away the math for locating a slot method
Fri, Aug 7, 1:48 AM
kevans committed rGda9d26a215a6: kern: add a security knob to disable unprivileged access to kenv (authored by kevans).
kern: add a security knob to disable unprivileged access to kenv
Fri, Aug 7, 1:48 AM
kevans committed rG6834c2660904: adjtime(2): document that delta can be NULL (authored by kevans).
adjtime(2): document that delta can be NULL
Fri, Aug 7, 1:48 AM
kevans committed rG70c07351df58: rights(4): fix our representation of the unused bits (authored by kevans).
rights(4): fix our representation of the unused bits
Fri, Aug 7, 1:48 AM
kevans committed rG2b25a0ebb48d: socket: remove tautological condition in so_unsplice() (authored by kevans).
socket: remove tautological condition in so_unsplice()
Fri, Aug 7, 1:48 AM
kevans committed rG690207d4efc1: build: provide a FORTIFY_SOURCE.<src file> override (authored by kevans).
build: provide a FORTIFY_SOURCE.<src file> override
Fri, Aug 7, 1:48 AM

Thu, Aug 6

kevans committed rGe73fcd4c3205: evdev: add devnum sysctl (authored by quentin.thebault_defenso.fr).
evdev: add devnum sysctl
Thu, Aug 6, 11:52 PM
kevans closed D57755: bsdinstall: add a hardening knob for unprivileged kenv access.

Sigh, I typo'ed "Differential". This has landed now.

Thu, Aug 6, 11:49 PM
kevans committed rG6e81fbf5833d: bsdinstall: add a hardening knob for unprivileged kenv access (authored by kevans).
bsdinstall: add a hardening knob for unprivileged kenv access
Thu, Aug 6, 11:42 PM
kevans committed rG01e37e47d240: rockchip: fix stack overflow in rk8xx_rtc (authored by kevans).
rockchip: fix stack overflow in rk8xx_rtc
Thu, Aug 6, 11:22 PM
kevans committed rG387634c880be: kern: syscall_thread_enter() cannot fail (authored by kevans).
kern: syscall_thread_enter() cannot fail
Thu, Aug 6, 11:22 PM
kevans committed rGe55aa7b67cb0: evdev: use a prometheus-safe label for ev_sysctl_tree (authored by kevans).
evdev: use a prometheus-safe label for ev_sysctl_tree
Thu, Aug 6, 11:22 PM
kevans committed rGc839c1566147: kern: add a security knob to disable unprivileged access to kenv (authored by kevans).
kern: add a security knob to disable unprivileged access to kenv
Thu, Aug 6, 11:22 PM
kevans committed rGf08af2491ffd: adjtime(2): document that delta can be NULL (authored by kevans).
adjtime(2): document that delta can be NULL
Thu, Aug 6, 11:22 PM
kevans committed rG8ab54c5d7dd9: rights(4): fix our representation of the unused bits (authored by kevans).
rights(4): fix our representation of the unused bits
Thu, Aug 6, 11:22 PM

Tue, Aug 4

kevans accepted D58645: pgpkeys: add adrian@ pgp key.

LGTM, and ack for the core@ add

Tue, Aug 4, 3:43 PM

Mon, Aug 3

kevans accepted D58597: sys/socket.h: Fix AF_MAX.
In D58597#1344902, @bms wrote:

This is directly in the line of fire of my GSoC student's MPLS work.

Mon, Aug 3, 2:48 PM

Sat, Aug 1

kevans committed rGa3a884c0d43a: stdio: *memstream: grow the buffer by 1.5x on write (authored by kevans).
stdio: *memstream: grow the buffer by 1.5x on write
Sat, Aug 1, 3:36 AM
kevans committed rG781defc7eb06: stdio: *memstream: decouple the buffer size from the stream length (authored by kevans).
stdio: *memstream: decouple the buffer size from the stream length
Sat, Aug 1, 3:36 AM
kevans committed rG28327c58ee6d: stdio: *memstream: slightly streamline growth function (authored by kevans).
stdio: *memstream: slightly streamline growth function
Sat, Aug 1, 3:36 AM
kevans closed D57355: stdio: *memstream: grow the buffer by 1.5x on write.
Sat, Aug 1, 3:36 AM
kevans closed D57354: stdio: *memstream: decouple the buffer size from the stream length.
Sat, Aug 1, 3:35 AM
kevans closed D57353: stdio: *memstream: slightly streamline growth function.
Sat, Aug 1, 3:35 AM
kevans added a comment to D58455: stdio: Simplify open_memstream.

This looks like what I've done in D57353 already, except with the assignment to buf moved into the conditional?

Sat, Aug 1, 3:02 AM

Mon, Jul 27

kevans accepted D58486: ports-mgmt/pkg: Fix UAF during additional SAT cycle.
In D58486#1341966, @des wrote:

I suspect I need approval from portmgr for this since @bapt is away

Mon, Jul 27, 9:38 PM

Fri, Jul 24

kevans committed R9:722a2d47e5ae: pgpkeys: add my @f.o uid to my new key, as well (authored by kevans).
pgpkeys: add my @f.o uid to my new key, as well
Fri, Jul 24, 4:29 AM
kevans closed D58430: pgpkeys: update the keys for core@.
Fri, Jul 24, 4:18 AM
kevans committed R9:eb8499eb89a5: pgpkeys: update the keys for core@ (authored by kevans).
pgpkeys: update the keys for core@
Fri, Jul 24, 4:18 AM
kevans requested review of D58430: pgpkeys: update the keys for core@.
Fri, Jul 24, 4:03 AM
kevans committed R9:9452c6943ef8: news: add the ports reset script (authored by kevans).
news: add the ports reset script
Fri, Jul 24, 12:41 AM

Thu, Jul 23

kevans accepted D58414: News: Announce 2026 ports freeze.
Thu, Jul 23, 3:41 PM
kevans committed R9:bd5cfe18aceb: pgpkeys: include second key for kevans (authored by kevans).
pgpkeys: include second key for kevans
Thu, Jul 23, 3:38 PM

Tue, Jul 21

kevans added inline comments to D58313: kqueue: Add NOTE_REAP.
Tue, Jul 21, 10:15 PM
kevans added inline comments to D46313: daemon(8): Add option to write pidfile w/o supervising it.
Tue, Jul 21, 6:05 PM
kevans committed rG2e3892671a6f: hid: u2f: stop interrupts on last-close (authored by kevans).
hid: u2f: stop interrupts on last-close
Tue, Jul 21, 4:59 PM
kevans closed D58199: hid: u2f: stop interrupts on last-close.
Tue, Jul 21, 4:58 PM
kevans added inline comments to D46313: daemon(8): Add option to write pidfile w/o supervising it.
Tue, Jul 21, 4:55 PM

Mon, Jul 20

kevans added inline comments to D58200: hidbus: stop interrupts before finalizing child deactivation.
Mon, Jul 20, 4:47 PM
kevans added a comment to D58187: uefisign: rename to efisign.
In D58187#1338218, @ivy wrote:

this might be a good time to move this to the FreeBSD-efi-tools package. it's probably a bug/oversight that it isn't already there.

Mon, Jul 20, 12:31 PM

Thu, Jul 16

kevans accepted D58289: tests/libc: Fix fortify_source uio tests.

Whoops, thanks!

Thu, Jul 16, 9:35 PM

Wed, Jul 15

kevans added a reviewer for D57157: linux: Support SYSLOG_ACTION_SIZE_BUFFER in syslog(2).: Linux Emulation.
Wed, Jul 15, 7:36 PM
kevans added a reviewer for D57173: linux: Implement fchmodat2(2).: Linux Emulation.
Wed, Jul 15, 7:36 PM
kevans added a reviewer for D57284: linux: Implement vfs ioctl for inode flags set/get: Linux Emulation.
Wed, Jul 15, 7:35 PM
kevans added a reviewer for D57285: linux: stub io_uring_setup.: Linux Emulation.
Wed, Jul 15, 7:35 PM
kevans added a reviewer for D57286: linux: enable FUTEX_REQUEUE if requested in the brand info.: Linux Emulation.
Wed, Jul 15, 7:35 PM
kevans added a reviewer for D57898: tarfs: remove unused 'ino' in mount structure.: des.
Wed, Jul 15, 7:29 PM
kevans added inline comments to D58200: hidbus: stop interrupts before finalizing child deactivation.
Wed, Jul 15, 1:47 PM

Tue, Jul 14

kevans added inline comments to D58223: kqueue: Avoid enqueuing an already-enqueued knote.
Tue, Jul 14, 1:47 PM
kevans added inline comments to D58223: kqueue: Avoid enqueuing an already-enqueued knote.
Tue, Jul 14, 1:04 PM
kevans added inline comments to D58223: kqueue: Avoid enqueuing an already-enqueued knote.
Tue, Jul 14, 3:23 AM

Mon, Jul 13

kevans added a reverting change for rGd94e034d5046: pkg: Add -j and -r options: rG9dfaf1cb37f8: Revert "pkg: Add -j and -r options".
Mon, Jul 13, 10:10 PM
kevans committed rG9dfaf1cb37f8: Revert "pkg: Add -j and -r options" (authored by kevans).
Revert "pkg: Add -j and -r options"
Mon, Jul 13, 10:10 PM
kevans added a reverting change for D58165: pkg: Add -j and -r options: rG9dfaf1cb37f8: Revert "pkg: Add -j and -r options".
Mon, Jul 13, 10:09 PM
kevans added a comment to D51865: libusb: capsicumize libusb.

hi!

So why are a whole lot of functions getting an fd added to them?

Do the FDs change during the runtime of the tool? Or are they something that could be set
once during some init phase (maybe in a new function which would call cap_enter, rather than
the owner having to call it) and then pulled out of some the libusb backend state?

IMO we really shouldn't have libraries entering capablity mode- libusb may be just one of many, and setting a precedence like that where some will insist on entering the sandbox is bound to end up with some really annoying circumstances.

I can somehow agree with you. But how can we integrate to bhyve without this as bhyve is capsicumized by default? We can turn off temporary but it adds complexity on bhyve.

Mon, Jul 13, 1:08 PM

Sun, Jul 12

kevans updated the diff for D58187: uefisign: rename to efisign.

Whack the remaining moles, fix OptionalObsoleteFiles to also remove the example

Sun, Jul 12, 7:59 PM
kevans committed rG87fb416ac882: usbdump: add -t to omit timestamps (authored by kevans).
usbdump: add -t to omit timestamps
Sun, Jul 12, 7:51 PM
kevans closed D58196: usbdump: add -t to omit timestamps.
Sun, Jul 12, 7:50 PM
kevans requested review of D58200: hidbus: stop interrupts before finalizing child deactivation.
Sun, Jul 12, 7:48 PM
kevans requested review of D58199: hid: u2f: stop interrupts on last-close.
Sun, Jul 12, 7:48 PM

Jul 12 2026

kevans requested review of D58196: usbdump: add -t to omit timestamps.
Jul 12 2026, 5:40 PM
kevans added a comment to D51865: libusb: capsicumize libusb.

hi!

So why are a whole lot of functions getting an fd added to them?

Do the FDs change during the runtime of the tool? Or are they something that could be set
once during some init phase (maybe in a new function which would call cap_enter, rather than
the owner having to call it) and then pulled out of some the libusb backend state?

Jul 12 2026, 3:16 PM
kevans added inline comments to D51865: libusb: capsicumize libusb.
Jul 12 2026, 3:12 PM
kevans committed rGd387a43ec8e2: rockchip: fix stack overflow in rk8xx_rtc (authored by kevans).
rockchip: fix stack overflow in rk8xx_rtc
Jul 12 2026, 2:51 PM
kevans closed D58182: rockchip: fix stack overflow in rk8xx_rtc.
Jul 12 2026, 2:51 PM
kevans added a reviewer for D58186: efisign: add to the efi-tools package: pkgbase.
Jul 12 2026, 2:15 AM
kevans requested review of D58187: uefisign: rename to efisign.
Jul 12 2026, 2:14 AM
kevans requested review of D58186: efisign: add to the efi-tools package.
Jul 12 2026, 2:14 AM
kevans requested review of D58182: rockchip: fix stack overflow in rk8xx_rtc.
Jul 12 2026, 1:17 AM

Jul 10 2026

kevans added a comment to D58152: libc: make dl_phdr_iter lock recursive for LSan.

Yes, I think @kib was at least mildly concerned when I raised the thought of doing the same, and we decided it was reasonably fine to just bypass the locks because we do dl_iterate_phdr, rfork (vfork) inside the handler, then ptrace the parent. The thread that holds the relevanr locks is suspended in rfork and safely not racing against what we do in the child.

Jul 10 2026, 1:58 PM
kevans added a comment to D58152: libc: make dl_phdr_iter lock recursive for LSan.
In D58152#1333559, @kib wrote:

You do understand, that the change is only changes something for the statically linked binaries?

We had already implemented a workaround in rtld, _dl_iterate_phdr_locked iirc. I'm not sure offhand why that wasn't sufficient here, I might need to re-check which lsan drop I sent to @aokblast

Yes, I see the comment from your brach and see both glibc and NetBSD (although very strange in their implemetation) has recursive dl_phdr_info_lock lock.

Jul 10 2026, 1:21 PM
kevans added a comment to D58152: libc: make dl_phdr_iter lock recursive for LSan.
In D58152#1333559, @kib wrote:

You do understand, that the change is only changes something for the statically linked binaries?

Jul 10 2026, 1:05 PM

Jul 8 2026

kevans added a comment to D58094: Capsicumise truss(1).

I don't think this patch is a good idea. It adds a bunch of complexity and state to a security layer in order to support a debugging feature, as I understand it.

Sanitizers and debuggers don't work properly with ASLR, so they just turn off ASLR. Why isn't that the approach here?

Jul 8 2026, 8:32 PM
kevans added a comment to D58094: Capsicumise truss(1).
In D58094#1332534, @kib wrote:

Even if the debugee is also in capability mode, the debugger would still potentially be able to obtain capabilities it doesn't already have, violating the sandbox rules.

For this, the debugger needs to get the procdesc to the target with enough cap allowed. If something provided it, then it was the decision.

... or a sandbox escape bug, if someone forgot to limit rights on the procdesc. There is at least one example in the tree. In particular, this is not a decision made by any existing code, since currently a process descriptor does not give you access to the target process' capabilities.

Given that LSAN is a testing tool, why do we care about having it work properly in capability mode at all? The sanitizer runtime could intercept cap_enter()/caph_enter() and prevent the target process from entering a sandbox when running under LSAN.

Another fair point- from my perspective, we probably don't particularly care about it working properly in capability mode, but we should care about the fact that capability mode would causes us to lose this incredibly useful functionality.

That can be solved in the majority of capsicumized things today by intercepting cap_enter, as you note- that doesn't help if an instrumented program was exec'd already in a sandbox by an uninstrumented parent, but to my knowledge we don't really have any case like that in base. I don't think "disabling capsicum on a larger scale if you want to use lsan" (the logical next step to address the last case) is a great approach if we can find a way to make it work safely in that context.

I suppose so, but extending the kernel to support this rather esoteric case, and in so doing increasing the attack surface available to any sandboxed process owning a procdesc with CAP_PTRACE_ATTACH, seems like a dubious tradeoff...

Jul 8 2026, 3:43 PM
kevans added a comment to D58094: Capsicumise truss(1).

Given that LSAN is a testing tool, why do we care about having it work properly in capability mode at all? The sanitizer runtime could intercept cap_enter()/caph_enter() and prevent the target process from entering a sandbox when running under LSAN.

Jul 8 2026, 3:17 PM
kevans added a comment to D58094: Capsicumise truss(1).
In D58094#1332294, @kib wrote:

Why not just use ptrace(PT_ATTACH, pdgetpid(), ...)? I can see some argument for PT_ATTACH_PD if you are planning to make ptrace() available in capability mode.

Exactly what Kyle said above.

Nice, this seems reasonable to me. I have a proposal that I'm gonig to send to a list, but effectively, I'd like to do a few things in this area:

  • Add a convenience pdopenpid(0, ...) -> similar to what we do with setpgrp/setpggid, special-case 0 to allow self-pdopenpid without a getpid() call
  • Mark pdopenpid(2) CAPENABLED, allow it in capability mode only for self-requests
  • Mark ptrace(2) CAPENABLED, only allow: PT_ATTACH_PD, PT_DETACH, PT_GETNUMLWPS, PT_GETLWPLIST, PT_GETREGS

PT_VM_TIMESTAMP, TP_VM_ENTRY, PT_GETREGSET, PT_GET_SC_ARGS, PT_GET_SC_RET, and MD options.

But I really thought that if you have the pfd with the capability, then you can debug the target as you want. pdopenpid() should be not allowed lightly for capsicum, but you could get the pfd by other means, e.g. by passing it from some fully privileged wrapper.

I think my concern is that you can easily exfiltrate or manage resources from the global namespace if you can get ahold of a pdfd for a process that isn't also in capability mode. Even without remote syscall capability directly, you can still drive arbitrary execution with proper stepping and reg swapping. We probably want to be pretty conservative in what we allow to limit the possible shenanigans.

Even if the debugee is also in capability mode, the debugger would still potentially be able to obtain capabilities it doesn't already have, violating the sandbox rules.

Jul 8 2026, 2:58 PM