Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
6ce5d5b
)
ipsec: fix integer overflow
74/41274/2
author
Fan Zhang
<fanzhang.oss@gmail.com>
Wed, 17 Jul 2024 15:08:12 +0000
(16:08 +0100)
committer
Matthew Smith
<mgsmith@netgate.com>
Fri, 19 Jul 2024 12:24:22 +0000
(12:24 +0000)
Type: fix
Coverity issue: 394440
Change-Id: I915a088145ee1317a7c8746b517f4af50323aa11
Signed-off-by: Fan Zhang <fanzhang.oss@gmail.com>
src/vnet/ipsec/ipsec_sa.h
patch
|
blob
|
history
diff --git
a/src/vnet/ipsec/ipsec_sa.h
b/src/vnet/ipsec/ipsec_sa.h
index
4f73f1e
..
640d928
100644
(file)
--- a/
src/vnet/ipsec/ipsec_sa.h
+++ b/
src/vnet/ipsec/ipsec_sa.h
@@
-486,7
+486,7
@@
ipsec_sa_anti_replay_and_sn_advance (const ipsec_sa_t *sa, u32 seq,
return 0;
}
- if (PREDICT_TRUE (sa->seq >= window_size - 1))
+ if (PREDICT_TRUE (
window_size > 0 &&
sa->seq >= window_size - 1))
{
/*
* the last sequence number VPP received is more than one