bugzilla-daemon at defect.opensolaris.org
2008-Mar-07 13:04 UTC
[Bug 697] New: zpool import dumps core when key available
http://defect.opensolaris.org/bz/show_bug.cgi?id=697 Summary: zpool import dumps core when key available Classification: Development Product: zfs-crypto Version: unspecified Platform: Other OS/Version: Solaris Status: NEW Severity: major Priority: P2 Component: other AssignedTo: ajscarp at yahoo.com ReportedBy: darrenm at opensolaris.org QAContact: hua.tang at sun.com CC: zfs-crypto-discuss at opensolaris.org Estimated Hours: 0.0 The pool does actually import but since zpool_load_key core dumps none of the datasets (not even the ones with encryption=off) get mounted. # zpool export tank # zpool import tank .... /1 at 1: -> libzfs:zpool_load_key(0x813f4c8, 0x0, 0x1) /1 at 1: -> libzfs:zpool_get_prop_int(0x813f4c8, 0x8, 0x0) /1 at 1: -> libzfs:zpool_get_all_props(0x813f4c8) /1 at 1: -> libzfs:zcmd_alloc_dst_nvlist(0x80e0548, 0x8041654, 0x0) /1 at 1: -> libzfs:zfs_alloc(0x80e0548, 0x800) /1 at 1: <- libzfs:zfs_alloc() = 0x80dfc08 /1 at 1: <- libzfs:zcmd_alloc_dst_nvlist() = 0 /1: ioctl(3, ZFS_IOC_POOL_GET_PROPS, 0x08041654) = 0 /1 at 1: -> libzfs:zcmd_read_dst_nvlist(0x80e0548, 0x8041654, 0x813f5dc) /1 at 1: <- libzfs:zcmd_read_dst_nvlist() = 0 /1 at 1: -> libzfs:zcmd_free_nvlists(0x8041654) /1 at 1: <- libzfs:zcmd_free_nvlists() = 1 /1 at 1: <- libzfs:zpool_get_all_props() = 0 /1 at 1: -> libzfs:zpool_prop_to_name(0x8) /1 at 1: <- libzfs:zpool_prop_to_name() = 0xfedf4fc4 /1 at 1: <- libzfs:zpool_get_prop_int() = 11 /1 at 1: -> libzfs:zpool_get_prop_int(0x813f4c8, 0x11, 0x0) /1 at 1: -> libzfs:zpool_prop_to_name(0x11) /1 at 1: <- libzfs:zpool_prop_to_name() = 0xfedf503c /1 at 1: <- libzfs:zpool_get_prop_int() = 2 /1 at 1: -> libzfs:zpool_get_prop_int(0x813f4c8, 0x12, 0x0) /1 at 1: -> libzfs:zpool_prop_to_name(0x12) /1 at 1: <- libzfs:zpool_prop_to_name() = 0xfedf4fec /1 at 1: <- libzfs:zpool_get_prop_int() = 0x36e8ce31 /1: Incurred fault #6, FLTBOUNDS %pc = 0xFEDA82B3 /1: siginfo: SIGSEGV SEGV_MAPERR addr=0x0000001C /1: Received signal #11, SIGSEGV [default] /1: siginfo: SIGSEGV SEGV_MAPERR addr=0x0000001C 0x12 is ZPOOL_PROP_SALT and the failing line of source is this one: default: cry->salt = zpool_get_prop_int(zhp, ZPOOL_PROP_SALT, NULL); cry is NULL during a zpool import, in do_import(): (void) zpool_load_key(zhp, NULL, B_TRUE); That style of calling zpool_load_key should be allowed (similarly for zfs_key_load(). I would rather see the salt only retrieved or generated after we actually know that the format of the keysource is "passphrase" - there is no point in storing a salt when the key format is hex or raw. This possibly means moving the code currently in zpool_key_load() for dealing with the slat down into use_key_material() function or similar in the KEY_FORMAT_PASSPHRASE case of the switch. Unfortunately though that may take some of the genericness away from that function since it doesn''t currently know if it is dealing with a dataset or a pool. I''m sure this can be resolved though. -- Configure bugmail: http://defect.opensolaris.org/bz/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
bugzilla-daemon at defect.opensolaris.org
2008-Mar-07 14:59 UTC
[Bug 697] zpool import dumps core when key available
http://defect.opensolaris.org/bz/show_bug.cgi?id=697 --- Comment #1 from Darren J Moffat <darrenm at opensolaris.org> 2008-03-07 06:59:22 --- I''m integrating into the gate a temporary fix for this issue by having zpool_main.c call zpool_key_load with a non NULL zfs_crypt_t. This will avoid the issue for now. This bug may well get closed by other means later. -- Configure bugmail: http://defect.opensolaris.org/bz/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
bugzilla-daemon at defect.opensolaris.org
2008-Mar-12 07:06 UTC
[Bug 697] zpool import dumps core when key available
http://defect.opensolaris.org/bz/show_bug.cgi?id=697 ajscarp at yahoo.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #2 from ajscarp at yahoo.com 2008-03-12 00:06:30 --- This has been completely taken care of by the March 11th fix -- Configure bugmail: http://defect.opensolaris.org/bz/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.