Package: argon2
Version: 0~20160406-2

When argon2(1) is executed, it always produces an unsuccessful exit with exit
code 132, and the error message `Illegal instruction', regardless of options
passed. The expected password hash is never printed to STDOUT.

For example:

    $ echo password | argon2 deadbeef
    Type:           Argon2i
    Iterations:     3 
    Memory:         4096 KiB
    Parallelism:    1 
    Illegal instruction
    $ echo $?
    132

    $ echo password | argon2 deadbeef -t 4069 -m 13 -p 4
    Type:           Argon2i
    Iterations:     4069 
    Memory:         8192 KiB
    Parallelism:    4 
    Illegal instruction
    $ echo $?
    132

Changing the salt length doesn't change anything:

    $ echo password | argon2 ca5cadedbeefcafe
    Type:           Argon2i
    Iterations:     3 
    Memory:         4096 KiB
    Parallelism:    1 
    Illegal instruction
    $ echo $?
    132

Executing with strace(1) to get more information:

    $ echo password | strace -f argon2 deadbeef
    execve("/usr/bin/argon2", ["argon2", "deadbeef"], [/* 25 vars */]) = 0
    brk(NULL)                               = 0x1c2d000
    access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or 
directory)
    mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7fc40b6be000
    access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or 
directory)
    open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
    fstat(3, {st_mode=S_IFREG|0644, st_size=117678, ...}) = 0
    mmap(NULL, 117678, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc40b6a1000
    close(3)                                = 0
    access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or 
directory)
    open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
    read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0a\0\0\0\0\0\0"..., 
832) = 832
    fstat(3, {st_mode=S_IFREG|0755, st_size=135984, ...}) = 0
    mmap(NULL, 2213008, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 
0x7fc40b282000
    mprotect(0x7fc40b29a000, 2093056, PROT_NONE) = 0
    mmap(0x7fc40b499000, 8192, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7fc40b499000
    mmap(0x7fc40b49b000, 13456, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fc40b49b000
    close(3)                                = 0
    access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or 
directory)
    open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
    read(3, 
"\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\7\2\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0755, st_size=1709784, ...}) = 0
    mmap(NULL, 3816000, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 
0x7fc40aede000
    mprotect(0x7fc40b079000, 2093056, PROT_NONE) = 0
    mmap(0x7fc40b278000, 24576, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19a000) = 0x7fc40b278000
    mmap(0x7fc40b27e000, 14912, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fc40b27e000
    close(3)                                = 0
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7fc40b6a0000
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7fc40b69f000
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7fc40b69e000
    arch_prctl(ARCH_SET_FS, 0x7fc40b69f700) = 0
    mprotect(0x7fc40b278000, 16384, PROT_READ) = 0
    mprotect(0x7fc40b499000, 4096, PROT_READ) = 0
    mprotect(0x609000, 4096, PROT_READ)     = 0
    mprotect(0x7fc40b6c0000, 4096, PROT_READ) = 0
    munmap(0x7fc40b6a1000, 117678)          = 0
    set_tid_address(0x7fc40b69f9d0)         = 3113
    set_robust_list(0x7fc40b69f9e0, 24)     = 0
    rt_sigaction(SIGRTMIN, {0x7fc40b287ba0, [], SA_RESTORER|SA_SIGINFO, 
0x7fc40b292d40}, NULL, 8) = 0
    rt_sigaction(SIGRT_1, {0x7fc40b287c30, [], 
SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7fc40b292d40}, NULL, 8) = 0
    rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
    getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
    fstat(0, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7fc40b6bd000
    read(0, "password\n", 4096)             = 9
    read(0, "", 4096)                       = 0
    fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 6), ...}) = 0
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7fc40b6bc000
    write(1, "Type:\t\tArgon2i\n", 15Type:          Argon2i
    )      = 15
    write(1, "Iterations:\t3 \n", 15Iterations:     3 
    )       = 15
    write(1, "Memory:\t\t4096 KiB\n", 18Memory:             4096 KiB
    )   = 18
    write(1, "Parallelism:\t1 \n", 16Parallelism:   1 
    )      = 16
    clock_gettime(CLOCK_PROCESS_CPUTIME_ID, {0, 1003232}) = 0
    brk(NULL)                               = 0x1c2d000
    brk(0x1c4e000)                          = 0x1c4e000
    mmap(NULL, 4198400, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) 
= 0x7fc40aadd000
    --- SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPN, si_addr=0x404067} ---
    +++ killed by SIGILL +++
    Illegal instruction

I don't see a reported bug upstream:

    https://github.com/P-H-C/phc-winner-argon2/issues?q=illegal%20instruction

Running the following system:

    $ uname -a
    Linux eightyeight 4.6.0-1-amd64 #1 SMP Debian 4.6.2-1 (2016-06-15) x86_64 
GNU/Linux

    $ cat /etc/issue
    Debian GNU/Linux stretch/sid \n \l

    $ awk '/processor.*: 0/,/^$/' /proc/cpuinfo
    processor       : 0
    vendor_id       : GenuineIntel
    cpu family      : 6
    model           : 26
    model name      : Intel(R) Core(TM) i7 CPU         950  @ 3.07GHz
    stepping        : 5
    microcode       : 0x11
    cpu MHz         : 1729.000
    cache size      : 8192 KB
    physical id     : 0
    siblings        : 8
    core id         : 0
    cpu cores       : 4
    apicid          : 0
    initial apicid  : 0
    fpu             : yes
    fpu_exception   : yes
    cpuid level     : 11
    wp              : yes
    flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
    cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx
    rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology
    nonstop_tsc aperfmperf eagerfpu pni dtes64 monitor ds_cpl vmx est tm2 ssse3
    cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm tpr_shadow vnmi flexpriority
    ept vpid dtherm ida
    bugs            :
    bogomips        : 6103.29
    clflush size    : 64
    cache_alignment : 64
    address sizes   : 36 bits physical, 48 bits virtual
    power management:

    $ dpkg --status argon2
    Package: argon2
    Status: install ok installed
    Priority: optional
    Section: utils
    Installed-Size: 63
    Maintainer: Luca Bruno <lu...@debian.org>
    Architecture: amd64
    Multi-Arch: foreign
    Version: 0~20160406-2
    Depends: libc6 (>= 2.14)
    Description: memory-hard hashing function - utility
     Argon2 is a password-hashing function that can be used to hash passwords
     for credential storage, key derivation, or other applications.
     .
     There are two main versions of Argon2: Argon2i and Argon2d.
     Argon2i is the safest against side-channel attacks, while Argon2d provides
     the highest resistance against GPU cracking attacks.
     .
     Argon2i and Argon2d are parametrized by:
      * A time cost, which defines the amount of computation realized and
        therefore the execution time, given in number of iterations
      * A memory cost, which defines the memory usage, given in kibibytes
      * A parallelism degree, which defines the number of parallel threads
     .
     This package contains the argon2 tool for hashing data on the command-line.
    Homepage: https://github.com/P-H-C/phc-winner-argon2

-- 
. o .   o . o   . . o   o . .   . o .
. . o   . o o   o . o   . o o   . . o
o o o   . o .   . o o   o o .   o o o

Attachment: signature.asc
Description: PGP signature

Reply via email to