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-next>] [day] [month] [year] [list]
Message-ID: <1472774683.5439.8.camel@edumazet-glaptop3.roam.corp.google.com>
Date:   Thu, 01 Sep 2016 17:04:43 -0700
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     David Miller <davem@...emloft.net>
Cc:     netdev <netdev@...r.kernel.org>
Subject: [BUG] af_packet FANOUT and device dismantle

Hi David

When you added fanout in commit dc99f600698dcac,
it seems a device dismantle is not properly handled.

packet_notifier() does properly finds all sockets attached to the
device and we call __unregister_prot_hook()

But the actual dev_remove_pack() is called when the last socket attached
to the FANOUT group is _closed_ , possibly minutes after the device
disappeared.

So we trigger the BUG_ON(!list_empty(&dev->ptype_all)); in
netdev_run_todo(), that came with linux-4.0 in 
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7866a621043fbaca3d7389e9b9f69dd1a2e5a855

Fix would be to call dev_remote_pack() from __fanout_unlink() when
num_members becomes 0.

Let me know if you agree with this, thanks.




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ