netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* OOM triggered by SCTP
@ 2019-07-16 21:47 Marek Majkowski
  2019-07-16 23:20 ` Neil Horman
  2019-07-16 23:59 ` malc
  0 siblings, 2 replies; 4+ messages in thread
From: Marek Majkowski @ 2019-07-16 21:47 UTC (permalink / raw)
  To: vyasevich, nhorman, marcelo.leitner, linux-sctp; +Cc: netdev, kernel-team

Morning,

My poor man's fuzzer found something interesting in SCTP. It seems
like creating large number of SCTP sockets + some magic dance, upsets
a memory subsystem related to SCTP. The sequence:

 - create SCTP socket
 - call setsockopts (SCTP_EVENTS)
 - call bind(::1, port)
 - call sendmsg(long buffer, MSG_CONFIRM, ::1, port)
 - close SCTP socket
 - repeat couple thousand times

Full code:
https://gist.github.com/majek/bd083dae769804d39134ce01f4f802bb#file-test_sctp-c

I'm running it on virtme the simplest way:
$ virtme-run --show-boot-console --rw --pwd --kimg bzImage --memory
512M --script-sh ./test_sctp

Originally I was running it inside net namespace, and just having a
localhost interface is sufficient to trigger the problem.

Kernel is 5.2.1 (with KASAN and such, but that shouldn't be a factor).
In some tests I saw a message that might indicate something funny
hitting neighbor table:

neighbour: ndisc_cache: neighbor table overflow!

I'm not addr-decoding the stack trace, since it seems unrelated to the
root cause.

Cheers,
    Marek

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

end of thread, other threads:[~2019-07-17  9:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-16 21:47 OOM triggered by SCTP Marek Majkowski
2019-07-16 23:20 ` Neil Horman
2019-07-16 23:59 ` malc
2019-07-17  9:08   ` Marek Majkowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).