DragonFlyBSD Kernel Audit
← triage · dashboard
DF-2537

ABTS RX_ID bound check uses IOC mpt_max_tgtcmds instead of actual tgt_cmd_ptrs array size (OOB read in FC target mode)

Summary

In mpt_fc_els_reply_handler ABTS path RX_ID (16-bit field from remote FC initiator ABTS frame) validated against mpt->mpt_max_tgtcmds but tgt_cmd_ptrs array is only min(MPT_MAX_REQUESTS/2 mpt_max_tgtcmds)=min(256 mpt_max_tgtcmds) entries wide. When IOC reports MaxPostedCmdBuffers>256 RX_ID values [256 mpt_max_tgtcmds) pass check but index past allocated array OOB read whose result dereferenced as request_t pointer. mpt_max_tgtcmds is port_facts MaxPostedCmdBuffers U16 IOC can report above 256. IOC-input router mpt.c:765 correctly bounds with tgt_cmds_allocated this FC ELS handler does not. Niche target-mode + MaxPostedCmdBuffers>256.

Discussion (0)

No comments yet.