https://github.com/torvalds/linux
Revision e8896495bca8490a427409e0886d63d05419ec65 authored by David Howells on 24 August 2006, 19:44:19 UTC, committed by Trond Myklebust on 24 August 2006, 19:53:34 UTC
Check the bounds of length specifiers more thoroughly in the XDR decoding of
NFS4 readdir reply data.

Currently, if the server returns a bitmap or attr length that causes the
current decode point pointer to wrap, this could go undetected (consider a
small "negative" length on a 32-bit machine).

Also add a check into the main XDR decode handler to make sure that the amount
of data is a multiple of four bytes (as specified by RFC-1014).  This makes
sure that we can do u32* pointer subtraction in the NFS client without risking
an undefined result (the result is undefined if the pointers are not correctly
aligned with respect to one another).

Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
(cherry picked from 5861fddd64a7eaf7e8b1a9997455a24e7f688092 commit)
1 parent 3cedf13
History
Tip revision: e8896495bca8490a427409e0886d63d05419ec65 authored by David Howells on 24 August 2006, 19:44:19 UTC
NFS: Check lengths more thoroughly in NFS4 readdir XDR decode
Tip revision: e889649
File Mode Size
Documentation
arch
block
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
scripts
security
sound
usr
.gitignore -rw-r--r-- 521 bytes
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 87.4 KB
Kbuild -rw-r--r-- 1.2 KB
MAINTAINERS -rw-r--r-- 70.9 KB
Makefile -rw-r--r-- 46.5 KB
README -rw-r--r-- 16.2 KB
REPORTING-BUGS -rw-r--r-- 3.0 KB

README

back to top