Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 351843 - sys-fs/cryptsetup-1.1.3-r3 segmentation fault on luksFormat
Summary: sys-fs/cryptsetup-1.1.3-r3 segmentation fault on luksFormat
Status: RESOLVED DUPLICATE of bug 283470
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-16 12:30 UTC by Jimmy C. Chau
Modified: 2011-01-16 12:53 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jimmy C. Chau 2011-01-16 12:30:29 UTC
When using cryptsetup (sys-fs/cryptsetup-1.1.3-r3) to initialize a LUKS partition on an external USB drive, it encounters a segmentation fault.  

Reproducible: Always

Steps to Reproduce:
1. Attach USB drive (shows up as /dev/sdb)
2. cryptsetup --debug luksFormat /dev/sdb
3. Observe "Segmentation fault"

Actual Results:  
# cryptsetup 1.1.3 processing "cryptsetup --debug luksFormat /dev/sdb"
# Locking memory.

WARNING!
========
This will overwrite data on /dev/sdb irrevocably.

Are you sure? (Type uppercase yes): YES
# Allocating crypt device /dev/sdb context.
# Trying to open and read device /dev/sdb.
# Initialising device-mapper backend, UDEV is enabled.
# Detected dm-crypt target of version 1.7.0.
# Timeout set to 0 miliseconds.
# Password retry count set to 0.
# Iteration time set to 1000 miliseconds.
# Password verification disabled.
Enter LUKS passphrase: 
Verify passphrase: 
# Formatting device /dev/sdb as type LUKS1.
# Initializing crypto backend (using secure memory).
# Topology: IO (512/0), offset = 0; Required alignment is 4096 bytes.
# Generating LUKS header version 1 using hash sha1, aes, cbc-essiv:sha256, MK 32 bytes
Segmentation fault


Expected Results:  
cryptsetup should have completed without a segmentation fault.  

Note that this drive has been tested for bad blocks:
# badblocks -b 4096 -c 1024 -w -s -t random -v /dev/sdb 
Checking for bad blocks in read-write mode
From block 0 to 244190645
Testing with random pattern: done                                
Reading and comparing: done                                
Pass completed, 0 bad blocks found.


Creating a partition and telling cryptsetup to use that instead doesn't help either.  revdep-rebuild does not try to rebuild any packages.  Using a different password or a different hash does not appear to help either.  


emerge --info cryptsetup:
Portage 2.1.9.25 (hardened/linux/amd64, gcc-4.4.4, glibc-2.11.2-r3, 2.6.36-gentoo-r5-2010Dec22 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.36-gentoo-r5-2010Dec22-x86_64-Intel-R-_Core-TM-2_Duo_CPU_U9400_@_1.40GHz-with-gentoo-1.12.14
Timestamp of tree: Sat, 15 Jan 2011 09:45:01 +0000
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.6.6-r1, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.14-r1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA @BINARY-REDISTRIBUTABLE AdobeFlash-10.1 PUEL"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe -msse4.1"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=core2 -O2 -pipe -msse4.1"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.netnitco.net      http://gentoo.mirrors.tds.net/gentoo    http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/     http://distfiles.gentoo.org     http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US en"
MAKEOPTS="--jobs=4 --load-average=2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/benf /usr/local/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="X acl alsa amd64 berkdb bzip2 cairo caps cjk cli consolekit cracklib crypt cups cxx dbus dri dvd exif ffmpeg flac gdbm gnutls gpm hal hardened iconv jpeg justify laptop mmx modules mp3 mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pcre perl pic png ppds pppd python readline sdl session spell sse sse2 ssl ssse3 sysfs system-sqlite tcpd theora threads truetype unicode urandom v4l2 vorbis xorg xv xvmc zlib" ALSA_CARDS="hda-intel usb-audio" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LINGUAS="en_US en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

sys-fs/cryptsetup-1.1.3-r3 was built with the following:
USE="(multilib) nls -dynamic (-selinux)"
Comment 1 Jimmy C. Chau 2011-01-16 12:53:53 UTC
Sorry, according to <http://code.google.com/p/cryptsetup/wiki/FrequentlyAskedQuestions#6._Issues_with_Specific_Versions_of_cryptsetup>, my bug appears to be a duplicate of bug #283470.  Recompiling cryptsetup with USE=dynamic solves it for me.  

*** This bug has been marked as a duplicate of bug 283470 ***