bug in crypsetup-luks-1.0.5 __crypt_luks_open()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I noticed that an invalid device segfaults cryptsetup. I'm using gcc
4.2.0 with -O2, and "cryptsetup luksOpen /not/a/device name" is adequate
to reproduce the segfault.

See attached patch for the (trivial) fix.

I'm not subscribed to the list, so please CC me with replies.

-- 
Jake Maciejewski <maciejej@xxxxxxxx>

--- cryptsetup-1.0.5/lib/setup.c	2007-08-15 08:02:24.000000000 -0500
+++ cryptsetup-1.0.5/lib/setup.c.fixed	2007-08-15 08:01:35.000000000 -0500
@@ -626,7 +626,7 @@
 
 	if (get_device_infos(options->device, &infos) < 0) {
 		set_error("Can't get device information.\n");
-		r = -ENOTBLK; goto out;
+		return -ENOTBLK;
 	}
 	if (infos.readonly)
 		options->flags |= CRYPT_FLAG_READONLY;


---------------------------------------------------------------------
dm-crypt mailing list - http://www.saout.de/misc/dm-crypt/
To unsubscribe, e-mail: dm-crypt-unsubscribe@xxxxxxxx
For additional commands, e-mail: dm-crypt-help@xxxxxxxx

[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux