[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJPywTL5aKYB40FsAFYFEuhErhgQpYZP5Q_ipMG9pDxqipcEDg@mail.gmail.com>
Date: Tue, 16 Jul 2019 23:47:40 +0200
From: Marek Majkowski <marek@...udflare.com>
To: vyasevich@...il.com, nhorman@...driver.com,
marcelo.leitner@...il.com, linux-sctp@...r.kernel.org
Cc: netdev@...r.kernel.org, kernel-team <kernel-team@...udflare.com>
Subject: OOM triggered by SCTP
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
Powered by blists - more mailing lists