Skip to content
Commit b4487b93 authored by Jeffrey Mitchell's avatar Jeffrey Mitchell Committed by Trond Myklebust
Browse files

nfs: Fix getxattr kernel panic and memory overflow



Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough

Fixes: aa9c2669 ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: default avatarJeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean up duplicate test of label->len != 0]
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent d474f961
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment