summaryrefslogtreecommitdiff
path: root/include/linux/stackprotector.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2016-09-20 18:06:17 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-10 10:26:05 +0200
commit724cfd5930d95c4759e06884b52d78501c192d13 (patch)
tree08cc1e4257574fa6cb9d54afa62721c763ca877f /include/linux/stackprotector.h
parent63bf5f01e5fcf8727ee3fc2089c54ed7396ace3e (diff)
net: get rid of an signed integer overflow in ip_idents_reserve()
commit adb03115f4590baa280ddc440a8eff08a6be0cb7 upstream. Jiri Pirko reported an UBSAN warning happening in ip_idents_reserve() [] UBSAN: Undefined behaviour in ./arch/x86/include/asm/atomic.h:156:11 [] signed integer overflow: [] -2117905507 + -695755206 cannot be represented in type 'int' Since we do not have uatomic_add_return() yet, use atomic_cmpxchg() so that the arithmetics can be done using unsigned int. Fixes: 04ca6973f7c1 ("ip: make IP identifiers less predictable") Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/stackprotector.h')
0 files changed, 0 insertions, 0 deletions