mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 08:46:46 +00:00
coda: fix 'kernel memory exposure attempt' in fsync
commit d337b66a4c
upstream.
When an application called fsync on a file in Coda a small request with
just the file identifier was allocated, but the declared length was set
to the size of union of all possible upcall requests.
This bug has been around for a very long time and is now caught by the
extra checking in usercopy that was introduced in Linux-4.8.
The exposure happens when the Coda cache manager process reads the fsync
upcall request at which point it is killed. As a result there is nobody
servicing any further upcalls, trapping any processes that try to access
the mounted Coda filesystem.
Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
cb58b8f8a8
commit
71d3850bf1
1 changed files with 1 additions and 2 deletions
|
@ -447,8 +447,7 @@ int venus_fsync(struct super_block *sb, struct CodaFid *fid)
|
|||
UPARG(CODA_FSYNC);
|
||||
|
||||
inp->coda_fsync.VFid = *fid;
|
||||
error = coda_upcall(coda_vcp(sb), sizeof(union inputArgs),
|
||||
&outsize, inp);
|
||||
error = coda_upcall(coda_vcp(sb), insize, &outsize, inp);
|
||||
|
||||
CODA_FREE(inp, insize);
|
||||
return error;
|
||||
|
|
Loading…
Reference in a new issue