ioctl() is unsafe

From: C J Considine (conx@connectnet.com)
Date: Thu May 18 2000 - 09:52:28 EST


As the structures returned from e.g. ioctl(fdev0,HDIO_GET_IDENTITY,&id)
change in length now and then, and the user include files are separate
from the kernel include files it seems that a length and possibly a
version number constant would be very smart 4th and 5th parameters.
They would prevent over-running the length of the supplied buffer and
trashing the stack or whatever. This might also avoid future exploits.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:15 EST