]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: fix stack contents leakage in the v1 inumber ioctls
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 29 Jul 2019 04:12:32 +0000 (21:12 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 29 Jul 2019 04:12:32 +0000 (21:12 -0700)
commit6a0cb86be66ec1aa3c184d66d6585e982dadef4e
treec9032b3e27c6e6acb57ec51248468b7b66c8aae0
parent41a187cd24925e8550afd67e1bda36b35bf2bd6a
xfs: fix stack contents leakage in the v1 inumber ioctls

Explicitly initialize the onstack structures to zero so we don't leak
kernel memory into userspace when converting the in-core inumbers
structure to the v1 inogrp ioctl structure.  Add a comment about why we
have to use memset to ensure that the padding holes in the structures
are set to zero.

Fixes: 6276579e91d5b03 ("xfs: introduce v5 inode group structure")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
fs/xfs/xfs_itable.c