Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: pmoore@redhat.com
Cc: netdev@vger.kernel.org, viro@zeniv.linux.org.uk,
	selinux@tycho.nsa.gov, linux-security-module@vger.kernel.org
Subject: Re: [RFC PATCH v2] ipv6: make ipv6_renew_options() interrupt/kernel safe
Date: Wed, 04 Jul 2018 14:28:53 +0900 (KST)	[thread overview]
Message-ID: <20180704.142853.1524154785411171806.davem@davemloft.net> (raw)
In-Reply-To: <153055565291.30739.11949388336400371265.stgit@chester>

From: Paul Moore <pmoore@redhat.com>
Date: Mon, 02 Jul 2018 14:20:52 -0400

> -static int ipv6_renew_option(void *ohdr,
> -			     struct ipv6_opt_hdr __user *newopt, int newoptlen,
> -			     int inherit,
> -			     struct ipv6_opt_hdr **hdr,
> -			     char **p)
> +static void ipv6_renew_option(int renewtype,
> +			      struct ipv6_opt_hdr **dest,
> +			      struct ipv6_opt_hdr *old,
> +			      struct ipv6_opt_hdr *new,
> +			      int newtype, char **p)
>  {
 ...
> +	p += CMSG_ALIGN(ipv6_optlen(*dest));

I don't think this actually advances the pointer in the caller,
you need something like:

	*p += CMSG_ALIGN(ipv6_optlen(*dest));

  reply	other threads:[~2018-07-04  5:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-02 18:20 [RFC PATCH v2] ipv6: make ipv6_renew_options() interrupt/kernel safe Paul Moore
2018-07-04  5:28 ` David Miller [this message]
2018-07-04 12:36   ` Paul Moore

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=20180704.142853.1524154785411171806.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=linux-security-module@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pmoore@redhat.com \
    --cc=selinux@tycho.nsa.gov \
    --cc=viro@zeniv.linux.org.uk \
    /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