Commit e9f35294 authored by I Viswanath's avatar I Viswanath Committed by Jakub Kicinski
Browse files

ptp: Add a upper bound on max_vclocks



syzbot reported WARNING in max_vclocks_store.

This occurs when the argument max is too large for kcalloc to handle.

Extend the guard to guard against values that are too large for
kcalloc

Reported-by: default avatar <syzbot+94d20db923b9f51be0df@syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=94d20db923b9f51be0df


Tested-by: default avatar <syzbot+94d20db923b9f51be0df@syzkaller.appspotmail.com>
Fixes: 73f37068 ("ptp: support ptp physical/virtual clocks conversion")
Signed-off-by: default avatarI Viswanath <viswanathiyyappan@gmail.com>
Acked-by: default avatarRichard Cochran <richardcochran@gmail.com>
Link: https://patch.msgid.link/20250925155908.5034-1-viswanathiyyappan@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 958baf5e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment