Skip to content
Commit b41d936b authored by Eric Dumazet's avatar Eric Dumazet Committed by Jakub Kicinski
Browse files

sch_netem: fix a divide by zero in tabledist()



syzbot managed to crash the kernel in tabledist() loading
an empty distribution table.

	t = dist->table[rnd % dist->size];

Simply return an error when such load is attempted.

Fixes: 1da177e4 ("Linux-2.6.12-rc2")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Reported-by: default avatarsyzbot <syzkaller@googlegroups.com>
Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
parent 432264e9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment