Project

General

Profile

Actions

Bug #3135

closed

lofi_uncompress doesn't initialize all variables

Added by Robert Mustacchi about 9 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Normal
Category:
cmd - userland programs
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.
Actions #1

Updated by Robert Mustacchi about 9 years ago

  • Subject changed from lofi_uncompress doesn't initialize all varaibles to lofi_uncompress doesn't initialize all variables
Actions #2

Updated by Robert Mustacchi about 9 years ago

  • Category set to cmd - userland programs
  • Status changed from New to Resolved
  • % Done changed from 90 to 100

Resolved in 13800:89bb108e9ab6.

Actions

Also available in: Atom PDF