Skip to content

Commit 1fb56cf

Browse files
committed
Fix out-of-bounds read past template fields terminator
BUG: KASAN: slab-out-of-bounds in netflow_scan_and_export+0x719/0x990 [ipt_NETFLOW] Read of size 2 at addr ffff88802e84d53d by task kworker/0:1/34 Note that this is not critical bug, since it reads slack data and it's not used.
1 parent 220ff5b commit 1fb56cf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ipt_NETFLOW.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4166,11 +4166,12 @@ static void export_dev(struct net_device *dev)
41664166
/* encode all fields */
41674167
for (i = 0; ; ) {
41684168
int type = tpl->fields[i++];
4169-
int size = tpl->fields[i++];
4169+
int size;
41704170
int n;
41714171

41724172
if (!type)
41734173
break;
4174+
size = tpl->fields[i++];
41744175
switch (type) {
41754176
case observationDomainId:
41764177
put_unaligned_be32(engine_id, ptr);

0 commit comments

Comments
 (0)