Re: [PATCH] NFS: Avoid cross-structure casting

2017-04-05 Thread Kees Cook
On Tue, Apr 4, 2017 at 6:09 PM, NeilBrown wrote: > On Tue, Apr 04 2017, Kees Cook wrote: > >> When the call to nfs_devname() fails, the error path attempts to retain >> the error via the mnt variable, but this requires a cast across very >> different types (char * to struct vfsmount), which the up

Re: [PATCH] NFS: Avoid cross-structure casting

2017-04-04 Thread NeilBrown
On Tue, Apr 04 2017, Kees Cook wrote: > When the call to nfs_devname() fails, the error path attempts to retain > the error via the mnt variable, but this requires a cast across very > different types (char * to struct vfsmount), which the upcoming structure > layout randomization plugin flags as

[PATCH] NFS: Avoid cross-structure casting

2017-04-04 Thread Kees Cook
When the call to nfs_devname() fails, the error path attempts to retain the error via the mnt variable, but this requires a cast across very different types (char * to struct vfsmount), which the upcoming structure layout randomization plugin flags as being potentially dangerous in the face of rand