lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 30 Dec 2018 10:10:24 -0500
From:   David Ahern <dsahern@...il.com>
To:     Ido Schimmel <idosch@...sch.org>
Cc:     David Ahern <dsahern@...nel.org>, netdev@...r.kernel.org,
        stephen@...workplumber.org
Subject: Re: [PATCH iproute2-next 00/12] Updates for strict checking and kernel side filtering



> On Dec 30, 2018, at 9:17 AM, Ido Schimmel <idosch@...sch.org> wrote:
> 
>> On Wed, Dec 19, 2018 at 07:54:15PM -0800, David Ahern wrote:
>> From: David Ahern <dsahern@...il.com>
>> 
>> Refactorings and updates to use the new strict checking in the kernel
>> along with the new kernel side filtering.
> 
> David,
> 
> Since this was applied to iproute2-next I get:
> 
> bash-4.4# bridge/bridge fdb show                                                                                                                                            
> [ 5365.137224] netlink: 4 bytes leftover after parsing attributes in process `bridge'.
> Error: bytes leftover after parsing attributes.
> Dump terminated
> 
> And a lot of tests are failing. Given you enabled strict checking, I
> assume we should be using 'struct ndmsg' in FDB dump? Following patch
> fixes it for me. I can submit formally if you don't already have a
> patch.


Please submit formally. Thanks for the fix


> 
> diff --git a/bridge/fdb.c b/bridge/fdb.c
> index a5abc1b6c78d..a7a0d8052307 100644
> --- a/bridge/fdb.c
> +++ b/bridge/fdb.c
> @@ -260,16 +260,16 @@ static int fdb_show(int argc, char **argv)
> {
>    struct {
>        struct nlmsghdr    n;
> -        struct ifinfomsg    ifm;
> +        struct ndmsg        ndm;
>        char            buf[256];
>    } req = {
> -        .n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)),
> -        .ifm.ifi_family = PF_BRIDGE,
> +        .n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ndmsg)),
> +        .ndm.ndm_family = PF_BRIDGE,
>    };
> 
>    char *filter_dev = NULL;
>    char *br = NULL;
> -    int msg_size = sizeof(struct ifinfomsg);
> +    int msg_size = sizeof(struct ndmsg);
> 
>    while (argc > 0) {
>        if ((strcmp(*argv, "brport") == 0) || strcmp(*argv, "dev") == 0) {
> @@ -313,10 +313,10 @@ static int fdb_show(int argc, char **argv)
>        filter_index = ll_name_to_index(filter_dev);
>        if (!filter_index)
>            return nodev(filter_dev);
> -        req.ifm.ifi_index = filter_index;
> +        req.ndm.ndm_ifindex = filter_index;
>    }
> 
> -    if (rtnl_dump_request(&rth, RTM_GETNEIGH, &req.ifm, msg_size) < 0) {
> +    if (rtnl_dump_request(&rth, RTM_GETNEIGH, &req.ndm, msg_size) < 0) {
>        perror("Cannot send dump request");
>        exit(1);
>    }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ