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: <20240430015813.71143-1-kuniyu@amazon.com>
Date: Mon, 29 Apr 2024 18:58:06 -0700
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: "David S. Miller" <davem@...emloft.net>, David Ahern <dsahern@...nel.org>,
	Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, "Paolo
 Abeni" <pabeni@...hat.com>
CC: Kuniyuki Iwashima <kuniyu@...zon.com>, Kuniyuki Iwashima
	<kuni1840@...il.com>, <netdev@...r.kernel.org>
Subject: [PATCH v3 net-next 0/7] arp: Random clean up and RCU conversion for ioctl(SIOCGARP).

arp_ioctl() holds rtnl_lock() regardless of cmd (SIOCDARP, SIOCSARP,
and SIOCGARP) to get net_device by __dev_get_by_name() and copy
dev->name safely.

In the SIOCGARP path, arp_req_get() calls neigh_lookup(), which looks
up a neighbour entry under RCU.

This series cleans up ioctl() code a bit and extends the RCU section
not to take rtnl_lock() and instead use dev_get_by_name_rcu() and
netdev_copy_name() for SIOCGARP.


Changes:
  v3:
    Add Patch 6 to read dev->name safely under seqlock.

  v2: https://lore.kernel.org/netdev/20240425170002.68160-1-kuniyu@amazon.com/
    Patch 5: s/!IS_ERR/IS_ERR/ in arp_req_delete().

  v1: https://lore.kernel.org/netdev/20240422194755.4221-1-kuniyu@amazon.com/


Kuniyuki Iwashima (7):
  arp: Move ATF_COM setting in arp_req_set().
  arp: Validate netmask earlier for SIOCDARP and SIOCSARP in
    arp_ioctl().
  arp: Factorise ip_route_output() call in arp_req_set() and
    arp_req_delete().
  arp: Remove a nest in arp_req_get().
  arp: Get dev after calling arp_req_(delete|set|get)().
  net: Protect dev->name by seqlock.
  arp: Convert ioctl(SIOCGARP) to RCU.

 include/linux/netdevice.h |   1 +
 net/core/dev.c            |  27 ++++-
 net/ipv4/arp.c            | 203 +++++++++++++++++++++++---------------
 3 files changed, 147 insertions(+), 84 deletions(-)

-- 
2.30.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ