mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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: Vasiliy Kulikov <[email protected]> Signed-off-by: Alex Elder <[email protected]>
This commit is contained in:
parent
5d0af85cd0
commit
6762b938ea
1 changed files with 1 additions and 1 deletions
|
|
@ -416,7 +416,7 @@ xfs_attrlist_by_handle(
|
|||
if (IS_ERR(dentry))
|
||||
return PTR_ERR(dentry);
|
||||
|
||||
kbuf = kmalloc(al_hreq.buflen, GFP_KERNEL);
|
||||
kbuf = kzalloc(al_hreq.buflen, GFP_KERNEL);
|
||||
if (!kbuf)
|
||||
goto out_dput;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue