aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_timer.c
diff options
context:
space:
mode:
authorXiaolei Wang <[email protected]>2022-08-25 19:19:22 +0800
committerMark Brown <[email protected]>2022-08-25 12:29:26 +0100
commit78e1e867f44e6bdc72c0e6a2609a3407642fb30b (patch)
treef088e67b2335028cd537da06bd49f59f9147c09b /net/lapb/lapb_timer.c
parentc32f1ebfd26bece77141257864ed7b4720da1557 (diff)
regulator: pfuze100: Fix the global-out-of-bounds access in pfuze100_regulator_probe()
The pfuze_chip::regulator_descs is an array of size PFUZE100_MAX_REGULATOR, the pfuze_chip::pfuze_regulators is the pointer to the real regulators of a specific device. The number of real regulator is supposed to be less than the PFUZE100_MAX_REGULATOR, so we should use the size of 'regulator_num * sizeof(struct pfuze_regulator)' in memcpy(). This fixes the out of bounds access bug reported by KASAN. Signed-off-by: Xiaolei Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions