PDA

View Full Version : cryptsetup and gpg issues



OrangeJuice484
2015-10-01, 12:30
I'm running nethunter v1.22 on a nexus 9 tablet and both gpg and cryptsetup are giving errors.

For gpg I run
gpg --gen-key and go through the menu to generate a private / public key. After it collects enough random bytes I get the following error:



gpg: invalid pid -1 in lockfile `/root/.gnupg/pubring.gpg.lock'
gpg: cannot read lockfile
gpg: can't lock `/root/.gnupg/pubring.gpg'
gpg: invalid pid -1 in lockfile `/root/.gnupg/secring.gpg.lock'
gpg: cannot read lockfile
gpg: can't lock `/root/.gnupg/secring.gpg'
gpg: error writing public keyring `/root/.gnupg/pubring.gpg': general error
Key generation failed: general error


For cryptsetup I run
cryptsetup luksFormat /path/to/my/volume and the tablet completely freezes up.

I tried doing all of this with nethunter 2.0 and tried other various solutions, but still got the same problems. I'm still researching the problems, but if anyone has any insight as to what might be going on or how to fix it, I would greatly appreciate it.

OrangeJuice484
2015-10-30, 13:05
The gpg issue was solved by deleting the .gnupg folder under ~/

I ran cryptsetup through dbg and found that it fails during an mlockall call.
the specific instruction it fails on is


svc 0

with r0 equal to 0x3 or 0x1

From an arm pdf i'm reading, "The SVC instruction causes a Supervisor Call exception. This provides a mechanism for unprivileged software to make a system call to an operating system."