bad system call on HP-UX 10.20

David DeSimone fox at rsn.hp.com
Wed Mar 22 19:27:17 CET 2000


Ralf Hildebrandt <R.Hildebrandt at tu-bs.de> wrote:
>
> Program received signal SIGSYS, Bad system call.
> 0x7affab10 in _mlock ()
> (gdb) bt
> #0  0x7affab10 in _mlock ()
> #1  0xd7b08 in lock_pool (p=0x7ae94000, n=16384) at secmem.c:120
> #2  0xd7e2c in init_pool (n=16384) at secmem.c:206
> #3  0xd8024 in secmem_init (n=16384) at secmem.c:266
> #4  0x1b3cc in main (argc=0, argv=0x7b03a464) at g10.c:659

The mlock() system call is implemented in HP-UX 11 and above, but not in
HP-UX 10.20, as near as I can tell.  HP-UX 10.20 implements the plock()
system call, which is sort of similar, but not the same.

Without mlock() or plock(), some of GPG's memory could possibly get
sent to the swap device, which is not completely secure.

> Oddly, this error only occurs when doing this as root?!

Performing an mlock() or plock() interferes with normal swapping
behavior.  Thus, the privelege must be granted, either by being root, or
adding your process to the privelege group MLOCK.  A rogue user abusing
this privilege could easily exhaust a machine's memory and bring it to a
screeching halt.

-- 
David DeSimone   | "The doctrine of human equality reposes on this:
fox at rsn.hp.com   |  that there is no man really clever who has not
Hewlett-Packard  |  found that he is stupid." -- Gilbert K. Chesterson
Richardson IT    |    PGP: 5B 47 34 9F 3B 9A B0 0D  AB A6 15 F1 BB BE 8C 44



More information about the Gnupg-devel mailing list