public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Richard Palethorpe <rpalethorpe@suse.com>
To: ltp@lists.linux.it
Subject: [LTP] [RFC 0/1] Test for vulnerability cve-2016-7117 in recvmmsg error return path
Date: Fri, 17 Mar 2017 10:37:32 +0100	[thread overview]
Message-ID: <20170317103732.4ce5208d@linux-v3j5> (raw)

Hello,

The following is a test for a vulnerability in recvmmsg. I have verified that
the bug is reproduced in kernels 3.16.6 (openSUSE branch) and 4.5.0-rc7
(mainline). This is the third security focused test I have created for LTP,
the idea being to detect regressions which allow particular exploits to
work. It can be considered work in progress for now.

Like many kernel exploits this vulnerability requires specific timings to
trigger a race condition. In order to trigger the system calls at the right
time I have used a delay created by nanosleep(). I have also tried using a
simple while loop which may be the better option in terms of accuracy, but I
have not yet found a measurable advantage of one over the other.

If the test successfully triggers the use-after-free then, at least some of
the time on my machine, a kernel null pointer exception is produced and the
test executable is terminated. I made some attempt to leverage the
use-after-free to cause an error on an unrelated socket, but was not
successful and did not pursue this very far as the test is satisfied by a null
pointer exception.

Any feedback or suggestions are welcome.

Thank you,
Richard.

Richard Palethorpe (1):
  Test for vulnerability cve-2016-7117 in recvmmsg error return path

 testcases/cve/2016-7117/cve-2016-7117.c | 203 ++++++++++++++++++++++++++++++++
 1 file changed, 203 insertions(+)
 create mode 100644 testcases/cve/2016-7117/cve-2016-7117.c

-- 
2.12.0

                 reply	other threads:[~2017-03-17  9:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170317103732.4ce5208d@linux-v3j5 \
    --to=rpalethorpe@suse.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox