Re: Why don't we always check that attr->port_num is valid?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 02, 2017 at 09:20:33AM -0600, Jason Gunthorpe wrote:
> On Mon, Oct 02, 2017 at 02:34:31PM +0300, Dan Carpenter wrote:
>
> > We deliberately allow invalid attr->port_nums if IB_QP_PORT is not set.
> > Why must we do that?  From a kernel hardening perspective it would be
> > better to ban invalid values all together...
>
> It is part of the user ABI, so it has to stay that way...

Can we pre-process all invalid parameters at the kernel entry points to
ensure that drivers receive clean input?

For example, overwrite attr->port_nums to be zero if IB_QP_PORT is not set.

>
> Can some code restructuring bring both things under the same if
> somehow?
>
> Jason
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux