Bug #3135
lofi_uncompress doesn't initialize all variables
Start date:
2012-08-30
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
Description
lofiadm started failing to decompress certain images on SmartOS. e.g.:
# cp /usr.lgz /var/tmp/foo.lgz # cd /var/tmp # lofiadm -U foo.lgz lofiadm: could not map file /var/tmp/foo.lgz: Invalid argument <pre> Jerry gave the following analysis: lofi_uncompress is passing in a struct lofi_ioctl that is allocated on the stack (and thus filled with garbage). In the kernel lofi_map_file is calling lofi_init_crypto which looks at a bunch of the garbage fields in the lofi_ioctl struct and since the values are invalid, errors out.
Updated by Robert Mustacchi over 8 years ago
- Subject changed from lofi_uncompress doesn't initialize all varaibles to lofi_uncompress doesn't initialize all variables
Updated by Robert Mustacchi over 8 years ago
- Category set to cmd - userland programs
- Status changed from New to Resolved
- % Done changed from 90 to 100
Resolved in 13800:89bb108e9ab6.