public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: "Linus Lüssing" <linus.luessing@ascom.ch>
Subject: Re: [B.A.T.M.A.N.] Null pointer dereference, ticket #146
Date: Thu, 3 Mar 2011 21:22:20 +0100	[thread overview]
Message-ID: <201103032122.21671.sven@narfation.org> (raw)
In-Reply-To: <1299179342-15418-1-git-send-email-linus.luessing@ascom.ch>

[-- Attachment #1: Type: Text/Plain, Size: 987 bytes --]

Linus Lüssing wrote:
> Hi everyone,
> 
> By accident I've typed in a mesh interface name for batman-adv which
> already existed as a real interface. This produces a null pointer
> dereference in orig_hash_add_if():
> http://www.open-mesh.org/ticket/146
> 
> The attached patch shall illustrate the problem, but I'm not quite
> satisfied with it. Although it seems to "fix" the problem and gets
> rid of the call trace, it is probably still very racy. Does anyone
> have an idea for a more sane but equally easy check to fix the issue?
> Or is the only sane solution to hold an rcu-lock and compare the
> hard_iface->soft_iface in hardif_enable_interface() with every
> hard-iface->net_dev from the hardif_list?
> 
> Cheers, Linus

Oh, it doesn't fix anything - it just works by accident. :)
You are just happy that bat_priv->orig_hash is still memory that is accessible 
by us and is zero.

Let me suggest another patch (may take a while).

Best regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2011-03-03 20:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-03 19:09 [B.A.T.M.A.N.] Null pointer dereference, ticket #146 Linus Lüssing
2011-03-03 19:09 ` [B.A.T.M.A.N.] [PATCH] RFC: batman-adv: Fix null pointer deref. when adding hard-if as soft-if Linus Lüssing
2011-03-03 20:22 ` Sven Eckelmann [this message]
2011-03-03 20:39 ` [B.A.T.M.A.N.] [PATCH] " Sven Eckelmann
2011-03-03 21:08   ` [B.A.T.M.A.N.] [PATCHv2] batman-adv: Disallow regular interface as mesh device Sven Eckelmann
2011-03-04 20:55     ` Marek Lindner
2011-03-04 21:18       ` Linus Lüssing
2011-03-04 21:24         ` Marek Lindner
2011-03-04 21:34     ` Marek Lindner

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=201103032122.21671.sven@narfation.org \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=linus.luessing@ascom.ch \
    /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