mirror of
https://github.com/torvalds/linux.git
synced 2024-12-03 17:41:22 +00:00
ed34695e15
We (adam zabrocki, alexander matrosov, alexander tereshkin, maksym
bazalii) observed the check:
if (fh->size > sizeof(struct nfs_fh))
should not use the size of the nfs_fh struct which includes an extra two
bytes from the size field.
struct nfs_fh {
unsigned short size;
unsigned char data[NFS_MAXFHSIZE];
}
but should determine the size from data[NFS_MAXFHSIZE] so the memcpy
will not write 2 bytes beyond destination. The proposed fix is to
compare against the NFS_MAXFHSIZE directly, as is done elsewhere in fs
code base.
Fixes:
|
||
---|---|---|
.. | ||
flexfilelayout.c | ||
flexfilelayout.h | ||
flexfilelayoutdev.c | ||
Makefile |