Bug 243736

Summary: Stack smashing detected durring cryptsetup luksOpen
Product: [Fedora] Fedora Reporter: Marcin Garski <mgarski>
Component: cryptsetup-luksAssignee: Till Maas <opensource>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 7CC: agk, dwysocha, mbroz, opensource, pjones, prockai
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://article.gmane.org/gmane.linux.kernel.device-mapper.dm-crypt/2231
Whiteboard:
Fixed In Version: 1.0.5-4.fc7.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-08-29 17:29:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marcin Garski 2007-06-11 16:21:54 UTC
Fedora 7 contains cryptsetup-luks 1.0-3. Using it can cause stack smashing
detection.

Steps to reproduce:
1. cryptsetup luksFormat -c aes-lrw-benbi -s 384 /dev/sda3
2. cryptsetup luksOpen /dev/sda3 enc

3. *** stack smashing detected ***: cryptsetup terminated

Updating to 1.0.5 resolved this issue. (You can also look at URL for original
bug report).

NOTE: Since 1.0.5 release cryptsetup-luks becomes cryptsetup

Comment 1 Till Maas 2007-07-26 16:43:16 UTC
FYI: In rawhide there is now cryptsetup 1.0.5.

Comment 2 Till Maas 2007-07-26 19:11:37 UTC
in setup.c from 1.0.3 to 1.0.5 the following one line changed from
memset(&mk,0,sizeof(mk)); 

to:

LUKS_dealloc_masterkey(mk);
I guess this fixes the problem, because a backtrace shows the following:
(gdb) bt
#0  0x080fb9a0 in raise ()
#1  0x080c0860 in abort ()
#2  0x080c9cdb in __libc_message ()
#3  0x080f2f60 in __stack_chk_fail ()
#4  0x0804e648 in __crypt_luks_open (arg=0, backend=0x8171e3c,
options=0xbfa759a0) at setup.c:612
#5  0x0804d8a0 in crypt_job (job=0x804e300 <__crypt_luks_open>, arg=2038320499,
options=0x626e6562) at setup.c:689
#6  0x0804875f in action_luksOpen (arg=0) at cryptsetup.c:249
#7  0x08048ffb in main (argc=Cannot access memory at address 0x7c5
) at cryptsetup.c:470
#8  0x080b9968 in __libc_start_main ()
#9  0x08048131 in _start ()


Comment 3 Marcin Garski 2007-08-01 15:01:42 UTC
Could you also push 1.0.5 to F7 update?

Comment 4 Fedora Update System 2007-08-15 19:40:40 UTC
cryptsetup-luks-1.0.5-4.fc7.1 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2007-08-29 17:29:22 UTC
cryptsetup-luks-1.0.5-4.fc7.1 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.