All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan-fJ+pQTUTwRTk1uMJSBkQmQ@public.gmane.org>
To: "linux-can-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-can-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Boris Baskevitch
	<boris.baskevitch-8eWYsXVvN4PZIJhgGyx37A@public.gmane.org>,
	Daniele Venzano <linux-aa24p/qCTT1g9hUCZPvPmw@public.gmane.org>,
	Josselin Costanzi
	<josselin.costanzi-Tny/h2m1dROW3RwJEphJ61AUjnlXr6A1@public.gmane.org>,
	Nathan Conrad
	<nconrad.mlock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Dirk Rohleder <dirk-pmyc6AMmRiliEfu1fGPkyA@public.gmane.org>,
	Luis Henriques
	<luis.henriques-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>,
	kernel-team-nLRlyDuq1AZFpShjVBNYrg@public.gmane.org,
	opensuse-kernel-stAJ6ESoqRxg9hUCZPvPmw@public.gmane.org
Subject: [INFO] BCM and ISOTP crashes Linux 3.11 - 3.13 when running on REAL HW CAN interfaces
Date: Sat, 01 Feb 2014 19:14:43 +0100	[thread overview]
Message-ID: <52ED3993.2080404@hartkopp.net> (raw)
In-Reply-To: <20140130.162723.1124545320708055175.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>

Hello all,

at 2013-08-01 Eric Dumazet created this patch to make sure some
networking rules are enforced in the Linux Kernel in Linux 3.11:
http://git.kernel.org/cgit/linux/kernel/git/davem/net.git/commit/?id=376c7311bdb6efea3322310333576a04d73fbe4c

This affects CAN BCM and CAN ISOTP and leads to a KERNEL CRASH
when you are *sending* with the BCM or ISOTP on REAL(!) CAN interfaces.

AFAIK there are not so many use cases. That's why it lasted 6 months to detect it :-(
Virtual CAN and SLCAN interfaces do not have this problem (no echo skbs).

Do I have to care about this issue?

Usually the embedded systems do not have such a recent kernel.
Regarding desktop distributions Redhat 7 runs a 3.10 kernel which is safe.

But e.g. OpenSuse 13.1 and Ubuntu 13.10 / Linux Mint Petra are based on
Linux 3.11 and Debian Jessie (current Debian testing) is on Linux 3.12.

The latter have the described problem with BCM / ISOTP until this patch 

http://git.kernel.org/cgit/linux/kernel/git/davem/net.git/commit/?id=0ae89beb283a0db5980d1d4781c7d7be2f2810d6

is applied by the stable kernel maintainers and distribution maintainers.
The patch is already upstream for Linux 3.14 but it will take some time
until it gets into the stable kernels 3.11 - 3.13 and the distributions.

As Linux 3.11 is already end-of-life [EOL] I'll address the Ubuntu and
OpenSuse maintainers directly so that this patch for 3.11 does not get lost.
David Miller already queued this patch up for -stable
Original post: http://marc.info/?l=linux-netdev&m=139107310226665&w=2

Take care,
Oliver


-------- Original Message --------
Subject: Re: [PATCH stable 3.9+] can: add destructor for self generated skbs
Date: Thu, 30 Jan 2014 16:27:23 -0800 (PST)
From: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
To: socketcan-fJ+pQTUTwRTk1uMJSBkQmQ@public.gmane.org
CC: eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, nautsch2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-can-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

From: Oliver Hartkopp <socketcan-fJ+pQTUTwRTk1uMJSBkQmQ@public.gmane.org>
Date: Thu, 30 Jan 2014 10:11:28 +0100

> Self generated skbuffs in net/can/bcm.c are setting a skb->sk reference but
> no explicit destructor which is enforced since Linux 3.11 with commit
> 376c7311bdb6 (net: add a temporary sanity check in skb_orphan()).
> 
> This patch adds some helper functions to make sure that a destructor is
> properly defined when a sock reference is assigned to a CAN related skb.
> To create an unshared skb owned by the original sock a common helper function
> has been introduced to replace open coded functions to create CAN echo skbs.
> 
> Signed-off-by: Oliver Hartkopp <socketcan-fJ+pQTUTwRTk1uMJSBkQmQ@public.gmane.org>
> Tested-by: Andre Naujoks <nautsch2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Applied and queued up for -stable, thanks.

  parent reply	other threads:[~2014-02-01 18:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-30  9:11 [PATCH stable 3.9+] can: add destructor for self generated skbs Oliver Hartkopp
2014-01-30  9:24 ` Marc Kleine-Budde
2014-01-30 23:10 ` Eric Dumazet
2014-01-31  0:27 ` David Miller
     [not found]   ` <20140130.162723.1124545320708055175.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2014-02-01 18:14     ` Oliver Hartkopp [this message]
2014-02-01 18:44       ` [INFO] BCM and ISOTP crashes Linux 3.11 - 3.13 when running on REAL HW CAN interfaces Marc Kleine-Budde
2014-02-02 18:00       ` Luis Henriques
2014-02-02 19:29         ` Oliver Hartkopp
2014-02-15 17:42           ` Netdev stable patches status Oliver Hartkopp
2014-02-16  0:07             ` 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=52ED3993.2080404@hartkopp.net \
    --to=socketcan-fj+pqtutwrtk1umjsbkqmq@public.gmane.org \
    --cc=boris.baskevitch-8eWYsXVvN4PZIJhgGyx37A@public.gmane.org \
    --cc=dirk-pmyc6AMmRiliEfu1fGPkyA@public.gmane.org \
    --cc=josselin.costanzi-Tny/h2m1dROW3RwJEphJ61AUjnlXr6A1@public.gmane.org \
    --cc=kernel-team-nLRlyDuq1AZFpShjVBNYrg@public.gmane.org \
    --cc=linux-aa24p/qCTT1g9hUCZPvPmw@public.gmane.org \
    --cc=linux-can-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=luis.henriques-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org \
    --cc=nconrad.mlock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=opensuse-kernel-stAJ6ESoqRxg9hUCZPvPmw@public.gmane.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 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.