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]
Date:   Wed, 6 Jul 2022 16:39:51 -0700
From:   Kuniyuki Iwashima <>
To:     "David S. Miller" <>,
        Eric Dumazet <>,
        Jakub Kicinski <>,
        Paolo Abeni <>,
        Luis Chamberlain <>,
        Kees Cook <>,
        Iurii Zaikin <>
CC:     Kuniyuki Iwashima <>,
        Kuniyuki Iwashima <>,
        <>, <>
Subject: [PATCH v2 net 00/12] sysctl: Fix data-races around ipv4_table.

A sysctl variable is accessed concurrently, and there is always a chance
of data-race.  So, all readers and writers need some basic protection to
avoid load/store-tearing.

The first half of this series changes some proc handlers used in ipv4_table
to use READ_ONCE() and WRITE_ONCE() internally to fix data-races on the
sysctl side.  Then, the second half adds READ_ONCE() to the other readers
of ipv4_table.

    * Drop some changes that makes backporting difficult
      * First cleanup patch
      * Lockless helpers and .proc_handler changes
    * Drop the tracing part for .sysctl_mem
      * Steve already posted a fix
    * Drop int-to-bool change for cipso
      * Should be posted to net-next later
    * Drop proc_dobool() change
      * Can be included in another series


Kuniyuki Iwashima (12):
  sysctl: Fix data races in proc_dointvec().
  sysctl: Fix data races in proc_douintvec().
  sysctl: Fix data races in proc_dointvec_minmax().
  sysctl: Fix data races in proc_douintvec_minmax().
  sysctl: Fix data races in proc_doulongvec_minmax().
  sysctl: Fix data races in proc_dointvec_jiffies().
  tcp: Fix a data-race around sysctl_tcp_max_orphans.
  inetpeer: Fix data-races around sysctl.
  net: Fix data-races around sysctl_mem.
  cipso: Fix data-races around sysctl.
  icmp: Fix data-races around sysctl.
  ipv4: Fix a data-race around sysctl_fib_sync_mem.

 Documentation/networking/ip-sysctl.rst |  2 +-
 include/net/sock.h                     |  2 +-
 kernel/sysctl.c                        | 25 ++++++++++++++-----------
 net/ipv4/cipso_ipv4.c                  | 12 +++++++-----
 net/ipv4/fib_trie.c                    |  2 +-
 net/ipv4/icmp.c                        |  5 +++--
 net/ipv4/inetpeer.c                    | 12 ++++++++----
 net/ipv4/tcp.c                         |  3 ++-
 8 files changed, 37 insertions(+), 26 deletions(-)


Powered by blists - more mailing lists