Skip to content

Commit 0143fc5

Browse files
miniplijankara
authored andcommitted
udf: avoid info leak on export
For type 0x51 the udf.parent_partref member in struct fid gets copied uninitialized to userland. Fix this by initializing it to 0. Signed-off-by: Mathias Krause <[email protected]> Signed-off-by: Jan Kara <[email protected]>
1 parent fe685aa commit 0143fc5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/udf/namei.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,6 +1279,7 @@ static int udf_encode_fh(struct inode *inode, __u32 *fh, int *lenp,
12791279
*lenp = 3;
12801280
fid->udf.block = location.logicalBlockNum;
12811281
fid->udf.partref = location.partitionReferenceNum;
1282+
fid->udf.parent_partref = 0;
12821283
fid->udf.generation = inode->i_generation;
12831284

12841285
if (parent) {

0 commit comments

Comments
 (0)