Re: AW: [PATCH] Fix attribute list size in do_get_nl_link()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/17/20 4:28 PM, Jonas Mark (BT-FIR/ENG1-Grb) wrote:
> Hi Marc,
> 
>> On 11/17/20 3:42 PM, Mark Jonas wrote:
>>> From: Wang Xin <xin.wang7@xxxxxxxxxxxx>
>>>
>>> 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@xxxxxxxxxxxx>
>>> Signed-off-by: Mark Jonas <mark.jonas@xxxxxxxxxxxx>
>>
>> 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?

here you are:

https://git.pengutronix.de/cgit/tools/libsocketcan/tag/?h=v0.0.12

https://public.pengutronix.de/software/libsocketcan/libsocketcan-0.0.12.tar.bz2

Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux