All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 0/2] inet: make exception handling less predictible
@ 2021-08-29 22:16 Eric Dumazet
  2021-08-29 22:16 ` [PATCH net 1/2] ipv6: make exception cache " Eric Dumazet
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Eric Dumazet @ 2021-08-29 22:16 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski
  Cc: netdev, Eric Dumazet, Eric Dumazet, Willy Tarreau, Keyu Man,
	David Ahern

From: Eric Dumazet <edumazet@google.com>

This second round of patches is addressing Keyu Man recommendations
to make linux hosts more robust against a class of brute force attacks.

Eric Dumazet (2):
  ipv6: make exception cache less predictible
  ipv4: make exception cache less predictible

 net/ipv4/route.c | 44 +++++++++++++++++++++++++++++---------------
 net/ipv6/route.c |  5 ++++-
 2 files changed, 33 insertions(+), 16 deletions(-)

-- 
2.33.0.259.gc128427fd7-goog


^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: [PATCH net 2/2] ipv4: make exception cache less predictible
  2021-08-29 22:16 ` [PATCH net 2/2] ipv4: " Eric Dumazet
  2021-08-30  0:40   ` David Ahern
@ 2021-08-30 11:34 ` Dan Carpenter
  0 siblings, 0 replies; 10+ messages in thread
From: kernel test robot @ 2021-08-30  2:39 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 3074 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210829221615.2057201-3-eric.dumazet@gmail.com>
References: <20210829221615.2057201-3-eric.dumazet@gmail.com>
TO: Eric Dumazet <eric.dumazet@gmail.com>
TO: "David S . Miller" <davem@davemloft.net>
TO: Jakub Kicinski <kuba@kernel.org>
CC: netdev <netdev@vger.kernel.org>
CC: Eric Dumazet <edumazet@google.com>
CC: Willy Tarreau <w@1wt.eu>
CC: Keyu Man <kman001@ucr.edu>
CC: David Ahern <dsahern@kernel.org>

Hi Eric,

I love your patch! Perhaps something to improve:

[auto build test WARNING on net/master]

url:    https://github.com/0day-ci/linux/commits/Eric-Dumazet/inet-make-exception-handling-less-predictible/20210830-061726
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git 57f780f1c43362b86fd23d20bd940e2468237716
:::::: branch date: 4 hours ago
:::::: commit date: 4 hours ago
config: x86_64-randconfig-m001-20210829 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
net/ipv4/route.c:606 fnhe_remove_oldest() error: potentially dereferencing uninitialized 'oldest_p'.

vim +/oldest_p +606 net/ipv4/route.c

2ffae99d1fac272 Timo Teräs      2013-06-27  588  
adf305d00ec06cb Eric Dumazet    2021-08-29  589  static void fnhe_remove_oldest(struct fnhe_hash_bucket *hash)
4895c771c7f006b David S. Miller 2012-07-17  590  {
adf305d00ec06cb Eric Dumazet    2021-08-29  591  	struct fib_nh_exception __rcu **fnhe_p, **oldest_p;
adf305d00ec06cb Eric Dumazet    2021-08-29  592  	struct fib_nh_exception *fnhe, *oldest = NULL;
4895c771c7f006b David S. Miller 2012-07-17  593  
adf305d00ec06cb Eric Dumazet    2021-08-29  594  	for (fnhe_p = &hash->chain; ; fnhe_p = &fnhe->fnhe_next) {
adf305d00ec06cb Eric Dumazet    2021-08-29  595  		fnhe = rcu_dereference_protected(*fnhe_p,
adf305d00ec06cb Eric Dumazet    2021-08-29  596  						 lockdep_is_held(&fnhe_lock));
adf305d00ec06cb Eric Dumazet    2021-08-29  597  		if (!fnhe)
adf305d00ec06cb Eric Dumazet    2021-08-29  598  			break;
adf305d00ec06cb Eric Dumazet    2021-08-29  599  		if (!oldest ||
adf305d00ec06cb Eric Dumazet    2021-08-29  600  		    time_before(fnhe->fnhe_stamp, oldest->fnhe_stamp)) {
4895c771c7f006b David S. Miller 2012-07-17  601  			oldest = fnhe;
adf305d00ec06cb Eric Dumazet    2021-08-29  602  			oldest_p = fnhe_p;
adf305d00ec06cb Eric Dumazet    2021-08-29  603  		}
4895c771c7f006b David S. Miller 2012-07-17  604  	}
2ffae99d1fac272 Timo Teräs      2013-06-27  605  	fnhe_flush_routes(oldest);
adf305d00ec06cb Eric Dumazet    2021-08-29 @606  	*oldest_p = oldest->fnhe_next;
adf305d00ec06cb Eric Dumazet    2021-08-29  607  	kfree_rcu(oldest, rcu);
4895c771c7f006b David S. Miller 2012-07-17  608  }
4895c771c7f006b David S. Miller 2012-07-17  609  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 39595 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-08-30 18:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-29 22:16 [PATCH net 0/2] inet: make exception handling less predictible Eric Dumazet
2021-08-29 22:16 ` [PATCH net 1/2] ipv6: make exception cache " Eric Dumazet
2021-08-30  0:39   ` David Ahern
2021-08-30 15:54     ` Wei Wang
2021-08-29 22:16 ` [PATCH net 2/2] ipv4: " Eric Dumazet
2021-08-30  0:40   ` David Ahern
2021-08-30 18:04 ` [PATCH net 0/2] inet: make exception handling " Keyu Man
  -- strict thread matches above, loose matches on Subject: below --
2021-08-30  2:39 [PATCH net 2/2] ipv4: make exception cache " kernel test robot
2021-08-30 11:34 ` Dan Carpenter
2021-08-30 11:34 ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.