nvmet_check_data_len() wrong behavior for nvme admin set features cmd

Sagi Grimberg sagi at grimberg.me
Sun Jan 8 07:30:00 PST 2023


> By the way, why not always call nvmet_check_data_len_lte() ?
> 
> Don’t we agree that the host is allowed to send sgl describing a buffer that is larger than the payload for any nvme io/admin cmd ?
> (and not only for dsm / set_features cmd)

I think we're better off with a tighter check, to avoid possible bugs.



More information about the Linux-nvme mailing list