raw_ip: validate inp
Post r335356 it is possible to have an inpcb on the hash lists that is partially torn down. Validate before using. Reported by: pho
This commit is contained in:
parent
63c4317055
commit
e5c331cf78
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=335497
@ -331,6 +331,10 @@ rip_input(struct mbuf **mp, int *offp, int proto)
|
||||
}
|
||||
INP_RLOCK(inp);
|
||||
last = inp;
|
||||
if (__predict_false(inp->inp_flags2 & INP_FREED)) {
|
||||
last = NULL;
|
||||
INP_RUNLOCK(inp);
|
||||
}
|
||||
}
|
||||
CK_LIST_FOREACH(inp, &V_ripcbinfo.ipi_hashbase[0], inp_hash) {
|
||||
if (inp->inp_ip_p && inp->inp_ip_p != proto)
|
||||
|
Loading…
Reference in New Issue
Block a user