Page MenuHomeFreeBSD

ctl_ioctl_frontend: Reject out-of-range initiator IDs
ClosedPublic

Authored by jhb on Apr 24 2026, 8:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 12, 3:08 PM
Unknown Object (File)
Tue, May 12, 2:53 PM
Unknown Object (File)
Tue, May 12, 10:30 AM
Unknown Object (File)
Mon, May 11, 8:13 PM
Unknown Object (File)
Sun, May 10, 7:02 AM
Unknown Object (File)
Sat, May 9, 3:15 PM
Unknown Object (File)
Fri, May 8, 11:38 AM
Unknown Object (File)
Fri, May 8, 5:30 AM
Subscribers

Details

Summary

Various places in CTL assume that initiator IDs are not larger than
CTL_MAX_INIT_PER_PORT. Other IDs such as lun IDs are validated in
places such as ctl_scsiio_precheck, but initiator IDs submitted by
userland were not previously validated.

PR: 291059
Reported by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
Sponsored by: Chelsio Communications

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.Apr 24 2026, 8:35 PM

Good catch. Is this something that can be triggered with libcam?

This revision is now accepted and ready to land.Apr 24 2026, 8:53 PM

Hans was able to trigger it with the virtio-scsi device model in bhyve. Presumably that was using libcam?