kern/155118: geom_eli containers created on systems with aesni(4) enabled are not working on systems without aesni(4) and vice versa.

Stefan Grundmann sg2342 at googlemail.com
Mon Feb 28 13:30:11 UTC 2011


>Number:         155118
>Category:       kern
>Synopsis:       geom_eli containers created on systems with aesni(4) enabled are not working on systems without aesni(4) and vice versa.
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 28 13:30:10 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Stefan Grundmann
>Release:        FreeBSD 8.2-STABLE
>Organization:
>Environment:
FreeBSD seth 8.2-STABLE FreeBSD 8.2-STABLE #1: Fri Feb 25 13:36:59 UTC 2011     sg at seth:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
geom_eli containers created on systems with aesni(4) enabled are not working on systems without aesni(4) and vice versa.

i tested this only on amd64 and only for AES-XTC and AES-CBC. The problem might also exists for 3DES-CBC if 3DES hardware crypto is used.

If this behavior (incompatibility of "Crypto: hardware" and "Crypto: software" in geom_eli) is known, it shopuld be documented in the geli man page.

best regards 

Stefan Grundmann
>How-To-Repeat:
seth# mdconfig -a -t malloc -s 8M -u 666
seth# echo -n foobar > /tmp/pass
seth# kldunload aesni
kldunload: can't find file aesni
seth# geli init -J /tmp/pass -i 5 -e AES-XTS -l 256 md666

Metadata backup can be found in /var/backups/md666.eli and
can be restored with the following command:

        # geli restore /var/backups/md666.eli md666

seth# geli attach -j /tmp/pass md666
seth# dd if=/dev/zero of=/dev/md666.eli
dd: /dev/md666.eli: end of device
16384+0 records in
16383+0 records out
8388096 bytes transferred in 0.986972 secs (8498818 bytes/sec)
seth# dd if=/dev/md666.eli bs=1M | md5
7+1 records in
7+1 records out
8388096 bytes transferred in 0.522124 secs (16065339 bytes/sec)
23a0c69af6b0a448c0372e738ccccbeb
seth# geli detach md666
seth# kldload aesni
seth# geli attach -j /tmp/pass md666
seth# dd if=/dev/md666.eli bs=1M | md5
7+1 records in
7+1 records out
8388096 bytes transferred in 0.406862 secs (20616562 bytes/sec)
a775583473215888a1a02d583b826d50
seth# geli detach md666
seth# 
seth# kldunload aesni
seth# geli attach -j /tmp/pass md666
seth# dd if=/dev/md666.eli bs=1M | md5
7+1 records in
7+1 records out
8388096 bytes transferred in 0.719863 secs (11652348 bytes/sec)
23a0c69af6b0a448c0372e738ccccbeb
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list