destroy does...!
Posted: Wed Apr 16, 2008 7:23 pm
Hi Lutz,
I thought I found a flaw (while being not root)
and im still looking into it => but meanwhile..
Perhpas this can be protected?
Wrong use of (destroy) reboots a machine instantly.
Now normaly you dont run as root, but you cant see
it from the newlisp prompt if you are root or not,
and I normaly dont check it eighter.. Here is the case =>
(destroy 0) kills current newlisp progress on UNIX, on windows it returns nil.
(destroy -1) kills current newlisp proces on Windows
on unix it kills your login or X sessions instantly when you are not root.
When you are root it kill your machine instantly !
(thats correct because "kill -9 0" does the same on unix)
So actualy is this a Flaw? Yes and no..
On Operating Level this is not a bug, but because you
use newlisp as a programmer and not as an System operator
its more of a flaw...
The PID "-1" is not documented under Unix (or somewhere hard to find),
although its perhpas logical to use "-1" for the process that
started your process its does not explicitly notify you on
anything...It just Kills instantly.
For security reasons (user protection) I would like to advice to
block all PID killing lower than 0 inside newlisp while using (destroy).
( or document the behaviour of destroy with a risk-mark..)
My oneliner for to day; "Hope its worth looking into, C adjustment is a one liner.. ;-)"
PS: I did not test it on OpenBsd but i will tonight..
PPS: just tested it, OBsd does the same kills root PID with -1 as user
but as Root is does not shutdown the machine! (Long live Obsd , Again!)
Norman.
I thought I found a flaw (while being not root)
and im still looking into it => but meanwhile..
Perhpas this can be protected?
Wrong use of (destroy) reboots a machine instantly.
Now normaly you dont run as root, but you cant see
it from the newlisp prompt if you are root or not,
and I normaly dont check it eighter.. Here is the case =>
(destroy 0) kills current newlisp progress on UNIX, on windows it returns nil.
(destroy -1) kills current newlisp proces on Windows
on unix it kills your login or X sessions instantly when you are not root.
When you are root it kill your machine instantly !
(thats correct because "kill -9 0" does the same on unix)
So actualy is this a Flaw? Yes and no..
On Operating Level this is not a bug, but because you
use newlisp as a programmer and not as an System operator
its more of a flaw...
The PID "-1" is not documented under Unix (or somewhere hard to find),
although its perhpas logical to use "-1" for the process that
started your process its does not explicitly notify you on
anything...It just Kills instantly.
For security reasons (user protection) I would like to advice to
block all PID killing lower than 0 inside newlisp while using (destroy).
( or document the behaviour of destroy with a risk-mark..)
My oneliner for to day; "Hope its worth looking into, C adjustment is a one liner.. ;-)"
PS: I did not test it on OpenBsd but i will tonight..
PPS: just tested it, OBsd does the same kills root PID with -1 as user
but as Root is does not shutdown the machine! (Long live Obsd , Again!)
Norman.