linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jonas Mark (BT-FIR/ENG1-Grb)" <Mark.Jonas@de.bosch.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>,
	"WANG Xin (BT-FIR/ENG1-Zhu)" <Xin.Wang7@cn.bosch.com>
Subject: AW: [PATCH] Fix attribute list size in do_get_nl_link()
Date: Tue, 17 Nov 2020 15:28:19 +0000	[thread overview]
Message-ID: <a2a1b05307604f1cb9ecb1245b4bc3a0@de.bosch.com> (raw)
In-Reply-To: <0285bc2b-dc7a-3fcb-3bc8-061e8e8e5bd5@pengutronix.de>

Hi Marc,

> On 11/17/20 3:42 PM, Mark Jonas wrote:
> > From: Wang Xin <xin.wang7@cn.bosch.com>
> >
> > The function do_get_nl_link() retrieves attributes from the response
> > RTM_NEWLINK. But it calculates the attribute list size with the wrong
> > structure struct ifaddrmsg. According to man 7 rtnetlink, RTM_NEWLINK
> > message uses struct ifinfomsg instead of struct ifaddrmsg.  This
> > causes that additional 8 bytes are parsed and garbage attributes might
> > be retrieved. One of consequences is that the message will be dropped
> > if the garbage attribute is IFLA_IFNAME and contains an invalid
> > interface name.
> >
> > To fix this issue, use struct ifinfomsg to calculate the size of
> > attribute list for RTM_NEWLINK.
> >
> > Signed-off-by: Wang Xin <xin.wang7@cn.bosch.com>
> > Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
> 
> Applied to master.

I plan to either add the patch to the libsocketcan recipe in meta-openembedded
or to upgrade the recipe to a new version of libsocketcan. I would prefer
upgrading the recipe to a new version.

Do you plan to release a new version of libsocketcan soon?

Greetings,
Mark

  reply	other threads:[~2020-11-17 15:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17 14:42 [PATCH] Fix attribute list size in do_get_nl_link() Mark Jonas
2020-11-17 14:54 ` Marc Kleine-Budde
2020-11-17 15:28   ` Jonas Mark (BT-FIR/ENG1-Grb) [this message]
2020-11-17 15:53     ` AW: " Marc Kleine-Budde

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=a2a1b05307604f1cb9ecb1245b4bc3a0@de.bosch.com \
    --to=mark.jonas@de.bosch.com \
    --cc=Xin.Wang7@cn.bosch.com \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    /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).