All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] cve: new regression test-case for CVE-2018-5803
Date: Thu, 22 Mar 2018 18:34:30 +0100	[thread overview]
Message-ID: <20180322173430.frvxkggp5a7wbs6b@dell5510> (raw)
In-Reply-To: <a26d2a06-429a-b0dd-995a-c01dbb7a4718@oracle.com>

Hi Alexey,

> Do you think we should include linux headers for consistency?
Yes, although both SOL_SCTP and SOL_UDPLITE are defined the same for all architectures and
probably never change, I'd include the header.

Actually SOL_UDPLITE is already defined in include/lapi/socket.h.
This file was added as wrapper for values <sys/socket.h> in aac9d1f0e by Xiao Yang,
I included sys/socket.h in that lapi file in 3fd5746a8
Later you added in 0bc572423 constants from linux/socket.h.
I don't know what is a best practise, but I'd include both files in include/lapi/socket.h
(they don't conflict) (or don't include neither of them):
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif

#ifdef HAVE_LINUX_SOCKET_H
# include <linux/socket.h>
#endif

> >> +
> >>  #ifndef SOL_UDPLITE
> >>  # define SOL_UDPLITE		136 /* UDP-Lite (RFC 3828) */
> >>  #endif
As I wrote, this is already defined in include/lapi/socket.h.

> >> diff --git a/runtest/cve b/runtest/cve
> >> index 0c385c6..826bb0b 100644
> ...
> >> +	fcntl(cfd, F_SETFL, O_NONBLOCK);
> >> +	connect(cfd, (struct sockaddr *)&rmt, sizeof(rmt));
> > Minor nit: you can use SAFE_CONNECT().


> No, it should fail in the kernels with the fix, on the second test-case when
> we get over-sized INIT chunk, I think ENOMEM returns in that case.
Oh sorry, understand.

Kind regards,
Petr

  reply	other threads:[~2018-03-22 17:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-12 16:36 [LTP] [PATCH] cve: new regression test-case for CVE-2018-5803 Alexey Kodanev
2018-03-20 14:00 ` Petr Vorel
2018-03-21 11:28   ` Alexey Kodanev
2018-03-22 17:34     ` Petr Vorel [this message]
2018-03-22 17:34     ` Petr Vorel
2018-03-21 14:26 ` Richard Palethorpe
2018-03-21 15:12   ` Alexey Kodanev

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=20180322173430.frvxkggp5a7wbs6b@dell5510 \
    --to=pvorel@suse.cz \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.