public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Marek Lindner <mareklindner@neomailbox.ch>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [PATCH maint v2 2/2] batman-adv: Fix segfault when writing to sysfs elp_interval
Date: Wed, 05 Sep 2018 19:09:09 +0800	[thread overview]
Message-ID: <5193548.c8HxFpEHO3@rousseau> (raw)
In-Reply-To: <20180831145629.26332-1-sven@narfation.org>

[-- Attachment #1: Type: text/plain, Size: 1238 bytes --]

On Friday, 31 August 2018 22:56:29 HKT Sven Eckelmann wrote:
> The per hardif sysfs file "batman_adv/elp_interval" is using the generic
> functions to store/show uint values. The helper __batadv_store_uint_attr
> requires the softif net_device as parameter to print the resulting change
> as info text when the users writes to this file. It uses the helper
> function batadv_info to add it at the same time to the kernel ring buffer
> and to the batman-adv debug log (when CONFIG_BATMAN_ADV_DEBUG is enabled).
> 
> The function batadv_info requires as first parameter the batman-adv softif
> net_device. This parameter is then used to find the private buffer which
> contains the debug log for this batman-adv interface. But
> batadv_store_throughput_override used as first argument the slave
> net_device. This slave device doesn't have the batadv_priv private data
> which is access by batadv_info.
> 
> Writing to this file with CONFIG_BATMAN_ADV_DEBUG enabled can either lead
> to a segfault or to memory corruption.
> 
> Fixes: ec46535b8275 ("batman-adv: Add hard_iface specific sysfs wrapper
> macros for UINT") Signed-off-by: Sven Eckelmann <sven@narfation.org>

Acked-by: Marek Lindner <mareklindner@neomailbox.ch>

Cheers,
Marek

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

  reply	other threads:[~2018-09-05 11:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-31 14:46 [B.A.T.M.A.N.] [PATCH maint 1/2] batman-adv: Fix segfault when writing to throughput_override Sven Eckelmann
2018-08-31 14:46 ` [B.A.T.M.A.N.] [PATCH maint 2/2] batman-adv: Fix segfault when writing to sysfs elp_interval Sven Eckelmann
2018-08-31 14:56 ` [B.A.T.M.A.N.] [PATCH maint v2 " Sven Eckelmann
2018-09-05 11:09   ` Marek Lindner [this message]
2018-09-05 10:55 ` [B.A.T.M.A.N.] [PATCH maint 1/2] batman-adv: Fix segfault when writing to throughput_override Marek Lindner
2018-09-05 16:07 ` Sven Eckelmann

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=5193548.c8HxFpEHO3@rousseau \
    --to=mareklindner@neomailbox.ch \
    --cc=b.a.t.m.a.n@lists.open-mesh.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