Do not allow TIOCSCTTY, TIOCNOTTY, or TIOCSPGRP on the pty master. Return
ENOTTY for all 3 of these. They could create incoherent session states,
leading to dangerous UAF reported by openai (unfortunately their proposed
patch was batshit crazy and made the situation worse, due to not identifying
this as root cause, and writing code to support the condition). with claudio
various versions ok kettenis kirill and others
get rid of the ifmedia bits in the ethernet tunnels.
the ifmedia ioctls werent wired up on these interfaces, so all this
was doing was wasting space in the softcs. so no functional change.
call etherbridge_up and _down in nvgre_up and _down.
etherbridge_up is needed to start aging entries in the etherbridge code.
reported by tom smyth
"looks good" jmatthew@
vmd(8): Actually check alignment
The alignment check tested offset and xfer_sz with &&, so it only
rejected a request when both were misaligned. offset is now always a
multiple of VIRTIO_BLK_SECTOR_SIZE, so that half is dead code; check
xfer_sz alone and fail when it is not a multiple of the sector size.
Also report the correct direction in the warning.
ok dv@
vmd(8): Reject vioblk requests beyond the disk capacity
vioblk_io() converted the guest-controlled sector to a byte offset and
passed it to the backend without comparing it against the disk capacity.
With a raw image on a regular file, pwritev() extends the file, so a
privileged guest could write past the configured size and exhaust the
host filesystem.
Pass the sector number to vioblk_io() as an unsigned value and defer the
conversion to a byte offset until after the bounds check. Once the full
transfer length is known, reject a start beyond capacity or a transfer
that crosses the end, then convert to off_t. The check is done in
unsigned arithmetic; the subtraction order avoids underflow and it never
multiplies the attacker-controlled sector.
From Acts1631, thanks!
ok dv@
Convert checkdisklabel() into a wrapper around a call to the
new checklabel() with a partition limit of MAXPARTITIONS16.
No functional change.
Prodded by deraadt@