Commit 6762b938 authored by Kulikov Vasiliy's avatar Kulikov Vasiliy Committed by Alex Elder

xfs: xfs_ioctl: fix information leak to userland

al_hreq is copied from userland.  If al_hreq.buflen is not properly aligned
then xfs_attr_list will ignore the last bytes of kbuf.  These bytes are
unitialized.  It leads to leaking of contents of kernel stack memory.
Signed-off-by: default avatarVasiliy Kulikov <segooon@gmail.com>
Signed-off-by: default avatarAlex Elder <aelder@sgi.com>
parent 5d0af85c
...@@ -416,7 +416,7 @@ xfs_attrlist_by_handle( ...@@ -416,7 +416,7 @@ xfs_attrlist_by_handle(
if (IS_ERR(dentry)) if (IS_ERR(dentry))
return PTR_ERR(dentry); return PTR_ERR(dentry);
kbuf = kmalloc(al_hreq.buflen, GFP_KERNEL); kbuf = kzalloc(al_hreq.buflen, GFP_KERNEL);
if (!kbuf) if (!kbuf)
goto out_dput; goto out_dput;
......
Markdown is supported
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