Streams ioctl for _I_CMD within kernel causes EFAULT
If a kernel module issues a streams ioctl call for _I_CMD, then it will fail with EFAULT.
This is because
strioctl() wrongly attempts to use
copyin() on the data despite the presence of the
Example code (vp is a pointer to a TLI vnode).
strcmd_t strcmd; int32_t rval; strcmd.sc_cmd = TI_GETMYNAME; strcmd.sc_timeout = 1; strcmd.sc_len = STRCMDBUFSIZE; ASSERT0(VOP_IOCTL(vp, _I_CMD, (intptr_t)&strcmd, FKIOCTL, CRED(), &rval, NULL));
Updated by Electric Monk 2 days ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
commit e63ea1f970505bef26ee06b3cef54076ad25b94e Author: Andy Fiddaman <firstname.lastname@example.org> Date: 2019-12-03T18:28:38.000Z 12043 Streams ioctl for _I_CMD within kernel causes EFAULT Reviewed by: John Levon <email@example.com> Reviewed by: Jason King <firstname.lastname@example.org> Approved by: Robert Mustacchi <email@example.com>