pdfcrack-mp
pdfcrack-mp copied to clipboard
Segmentation fault: 11 in multi-threaded mode
The attached file generates a Segmentation fault when running in multi-threaded mode: Segmentation-Fault-11.pdf
The single threaded version works fine:
./pdfcrack -o Segmentation-Fault-11.pdf
Output:
Security Handler: Standard
V: 2
R: 3
P: -1852
Length: 128
Encrypted Metadata: True
FileID: 40c924f59417d644bebff23b078ef1ce
U: 0c4ff9cfa4b90bb070de16b472ad848600000000000000000000000000000000
O: fd06cbc018316c5a5059688afe75351721088810d15ab79395055542a3611d67
Password method 2
On to the crack
Entered runCrackRev3_of
Average Speed: 10000.0 w/s. Current Word: 'xe4b'
...
However, the multi-threaded version crashes immediately:
./pdfcrack -o -t 4 -e [abc] Segmentation-Fault-11.pdf
Output:
PDF version 1.4
Security Handler: Standard
V: 2
R: 3
P: -1852
Length: 128
Encrypted Metadata: True
FileID: 40c924f59417d644bebff23b078ef1ce
U: 0c4ff9cfa4b90bb070de16b472ad848600000000000000000000000000000000
O: fd06cbc018316c5a5059688afe75351721088810d15ab79395055542a3611d67
Password method 3
De-classed pattern: [abc]
Parsed pattern: [abc], length: 1
Pattern element 0: Value: abc, Length: 3, Divisor: 1
Max pattern passwords: 3
On to the crack
Entered runCrackRev3_of
Segmentation fault: 11
echo $?
139
Thanks in advance for any suggestion! :-)
There's (more than, I think) a bug in pattern parsing. As a workaround you can use e.g. [:lower:]{1,5}[:lower:]
instead of [:lower:]{1,6}
.