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)
Thu, Jun 11, 11:24 PM
Unknown Object (File)
Wed, Jun 10, 10:33 AM
Unknown Object (File)
Thu, Jun 4, 6:20 AM
Unknown Object (File)
Wed, May 27, 7:09 AM
Unknown Object (File)
May 12 2026, 3:08 PM
Unknown Object (File)
May 12 2026, 2:53 PM
Unknown Object (File)
May 12 2026, 10:30 AM
Unknown Object (File)
May 11 2026, 8:13 PM
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?