public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] In-kernel fuzz testing for apps
@ 2015-11-18 23:39 Andrey Utkin
  2015-11-19 15:37 ` Austin S Hemmelgarn
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andrey Utkin @ 2015-11-18 23:39 UTC (permalink / raw)
  To: linux-kernel, Anton

[-- Attachment #1: Type: text/plain, Size: 1536 bytes --]

Me and my friend have once talked about careful application development,
which includes awareness about all possible error conditions.
So we have collected ideas about making kernel (or, in some cases, libc)
"hostile" to careless application, and we present it so that the idea
doesn't get lost, and maybe even gets real if somebody wants some
features from the list.

- (libc) crash instantly if memcpy detects regions overlapping;
- return EINTR as much as possible;
- send/recv/etc. returns EAGAIN on non-blocking sockets as much as possible;
- send/recv tend to result in short writes/reads, e.g. 1 byte at a time,
to break assumption about sending/receiving some "not-so-big" thing at once;
- let write return ENOSPC sometimes;
- scheduler behaves differently from common case (e.g. let it tend to
stop a thread at some syscalls);
- return allocation failures;
- make OOM killer manic!
- make clocks which are not monotonic to go backward frequently;
- pretend the time is 2038 year or later;
- (arguable) close syscall returns non-zero first time, or randomly;
- (arguable) special arch having NULL not all zero-bits. Actually I
don't believe it is feasible to make a lot of modern software to run in
such situation.

These horrific modes should be enabled per-process or per-executable-file.

Thanks for your time and for any kind comment.

-- 
OpenPGP usage is appreciated (it also helps your letter to bypass spam
filters). To email me with encryption easily, go
https://encrypt.to/0xC6FCDB11


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-12-04  8:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-18 23:39 [RFC] In-kernel fuzz testing for apps Andrey Utkin
2015-11-19 15:37 ` Austin S Hemmelgarn
2015-11-19 17:25 ` Laura Abbott
2015-12-04  8:00 ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox