Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 16 Apr 2013 09:02:31 +0100
From: Justin Cormack <justin@...cialbusservice.com>
To: musl@...ts.openwall.com
Subject: unexpected syscall failures

I noticed that in some places we assume some system calls will not fail,
one example being in nice that I was looking at the other day, but there
are others:

return setpriority(PRIO_PROCESS, 0, getpriority(PRIO_PROCESS, 0)+inc);

Now in Linux you can use security frameworks (eg type 2 seccomp) to make
any system call fail. Do we want to program defensively around these cases?
(In the case of seccomp I think most people use it to abort the program not
error, but you can).

I am inclined to think that if someone makes getpid fail they deserve
anything they get. I can't see any security issues, just some potentially
confusing behaviour, eg here nice might succeed (but set errno) if
getpriority fails. But testing does have downsides.

Justin

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.