[Bug 262671] Kernel panics after a invalid SNDCTL_MIXERINFO ioctl

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 19 Mar 2022 23:52:39 UTC

Ed Maste <emaste@freebsd.org> changed:

           What    |Removed                     |Added
                 CC|                            |hps@FreeBSD.org

--- Comment #5 from Ed Maste <emaste@freebsd.org> ---
We only compare against mi->dev so it shouldn't matter if it's an invalid

                if (d->mixer_dev != NULL && d->mixer_dev->si_drv1 != NULL &&
                    ((mi->dev == -1 && d->mixer_dev == i_dev) ||
                    mi->dev == nmix)) {

Indeed setting it to an explicit invalid value is fine, ktrace shows:

 36100 a.out    CALL  ioctl(0x3,SNDCTL_MIXERINFO,0x820ea1188)
 36100 a.out    RET   ioctl -1 errno 22 Invalid argument
 36100 a.out    CALL  exit(0)

What version (git hash if on main) are you using?

You are receiving this mail because:
You are the assignee for the bug.