linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Moore <paul@paul-moore.com>
To: David Miller <davem@davemloft.net>
Cc: s-nazarov@yandex.ru, netdev@vger.kernel.org,
	linux-security-module@vger.kernel.org, kuznet@ms2.inr.ac.ru,
	yoshfuji@linux-ipv6.org
Subject: Re: [PATCH] NETWORKING: avoid use IPCB in cipso_v4_error
Date: Fri, 15 Feb 2019 15:04:23 -0500	[thread overview]
Message-ID: <CAHC9VhRys7Efm=aQqph2ug9c8Ryra9imEG66avjeEeY8QZWTqw@mail.gmail.com> (raw)
In-Reply-To: <20190215.120009.1549205062473501080.davem@davemloft.net>

On Fri, Feb 15, 2019 at 3:00 PM David Miller <davem@davemloft.net> wrote:
> From: Paul Moore <paul@paul-moore.com>
> Date: Fri, 15 Feb 2019 14:02:31 -0500
>
> > On Thu, Feb 14, 2019 at 11:43 AM David Miller <davem@davemloft.net> wrote:
> >> From: Nazarov Sergey <s-nazarov@yandex.ru>
> >> Date: Tue, 12 Feb 2019 18:10:03 +0300
> >>
> >> > Since cipso_v4_error might be called from different network stack layers, we can't safely use icmp_send there.
> >> > icmp_send copies IP options with ip_option_echo, which uses IPCB to take access to IP header compiled data.
> >> > But after commit 971f10ec ("tcp: better TCP_SKB_CB layout to reduce cache line misses"), IPCB can't be used
> >> > above IP layer.
> >> > This patch fixes the problem by creating in cipso_v4_error a local copy of compiled IP options and using it with
> >> > introduced __icmp_send function. This looks some overloaded, but in quite rare error conditions only.
> >> >
> >> > The original discussion is here:
> >> > https://lore.kernel.org/linux-security-module/16659801547571984@sas1-890ba5c2334a.qloud-c.yandex.net/
> >> >
> >> > Signed-off-by: Sergey Nazarov <s-nazarov@yandex.ru>
> >>
> >> This problem is not unique to Cipso, net/atm/clip.c's error handler
> >> has the same exact issue.
> >>
> >> I didn't scan more of the tree, there are probably a couple more
> >> locations as well.
> >
> > David, are you happy with Sergey's solution as a fix for this?
> >
> > If so, would you prefer a respin of this patch to apply the to the
> > other broken callers (e.g. net/atm/clip.c), or would you rather merge
> > this patch and deal with the other callers in separate patches?
>
> I'd like the other broken callers to be handled.

Sergey, do you think you could fix the other callers too, or do you
want some help with that?

-- 
paul moore
www.paul-moore.com

  reply	other threads:[~2019-02-15 20:04 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-15 17:06 Kernel memory corruption in CIPSO labeled TCP packets processing Nazarov Sergey
2019-01-15 17:55 ` Casey Schaufler
2019-01-15 19:52   ` Paul Moore
2019-01-18 14:53     ` Paul Moore
2019-01-18 16:34       ` Nazarov Sergey
2019-01-18 17:17         ` Paul Moore
2019-01-21 17:11           ` Nazarov Sergey
2019-01-22 16:49             ` Paul Moore
2019-01-22 17:35               ` Nazarov Sergey
2019-01-22 17:48                 ` Paul Moore
2019-01-24 14:46                   ` Nazarov Sergey
2019-01-25 16:45                     ` Paul Moore
2019-01-28 13:10                       ` Nazarov Sergey
2019-01-28 22:18                         ` Paul Moore
2019-01-29  7:23                           ` Nazarov Sergey
2019-01-29 22:42                             ` Paul Moore
2019-01-30 13:11                               ` Nazarov Sergey
2019-01-31  2:10                                 ` Paul Moore
2019-01-31 13:20                                   ` Nazarov Sergey
2019-02-11 20:37                                     ` Paul Moore
2019-02-11 21:21                                       ` Nazarov Sergey
2019-02-11 23:43                                         ` Paul Moore
2019-02-12 15:10                                           ` [PATCH] NETWORKING: avoid use IPCB in cipso_v4_error Nazarov Sergey
2019-02-13 21:41                                             ` Paul Moore
2019-02-14 18:00                                               ` Nazarov Sergey
2019-02-14 18:59                                                 ` Stephen Smalley
2019-02-14 16:43                                             ` David Miller
2019-02-14 18:14                                               ` Nazarov Sergey
2019-02-15 19:02                                               ` Paul Moore
2019-02-15 20:00                                                 ` David Miller
2019-02-15 20:04                                                   ` Paul Moore [this message]
2019-02-18 13:39                                                     ` Nazarov Sergey
2019-02-19  1:25                                                       ` David Miller
2019-02-22 16:35                                                         ` Nazarov Sergey
2019-02-22 17:39                                                           ` [PATCH v2 0/2] " Nazarov Sergey
2019-02-25  1:33                                                             ` David Miller
2019-02-25 16:24                                                               ` [PATCH v2 1/2] " Nazarov Sergey
2019-02-25 22:07                                                                 ` Paul Moore
2019-02-25 22:33                                                                 ` David Miller
2019-02-25 23:30                                                                   ` Paul Moore
2019-02-25 16:27                                                               ` [PATCH v2 2/2] " Nazarov Sergey
2019-02-25 22:06                                                                 ` Paul Moore
2019-02-25 22:34                                                                 ` David Miller
2019-02-22 17:43                                                           ` [PATCH v2 1/2] " Nazarov Sergey
2019-02-22 17:50                                                           ` [PATCH v2 2/2] " Nazarov Sergey
2019-02-25  1:33                                                           ` [PATCH] " David Miller

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='CAHC9VhRys7Efm=aQqph2ug9c8Ryra9imEG66avjeEeY8QZWTqw@mail.gmail.com' \
    --to=paul@paul-moore.com \
    --cc=davem@davemloft.net \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-security-module@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=s-nazarov@yandex.ru \
    --cc=yoshfuji@linux-ipv6.org \
    /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;
as well as URLs for NNTP newsgroup(s).