Skip to content

Commit

Permalink
isofs: avoid info leak on export
Browse files Browse the repository at this point in the history
For type 1 the parent_offset member in struct isofs_fid gets copied
uninitialized to userland. Fix this by initializing it to 0.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
  • Loading branch information
minipli authored and jankara committed Jul 13, 2012
1 parent 57b9655 commit fe685aa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/isofs/export.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ isofs_export_encode_fh(struct inode *inode,
len = 3;
fh32[0] = ei->i_iget5_block;
fh16[2] = (__u16)ei->i_iget5_offset; /* fh16 [sic] */
fh16[3] = 0; /* avoid leaking uninitialized data */
fh32[2] = inode->i_generation;
if (parent) {
struct iso_inode_info *eparent;
Expand Down

0 comments on commit fe685aa

Please sign in to comment.