aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorHeikki Krogerus <[email protected]>2020-09-16 12:00:34 +0300
committerGreg Kroah-Hartman <[email protected]>2020-09-16 12:34:10 +0200
commit386e15a650447f53de3d2d8819ce9393f31650a4 (patch)
treedb19de98cdb06759dec3331b81e143cb4757cddb /tools/perf/scripts/python/export-to-postgresql.py
parent130a96d698d7bee9f339832d1e47ab26aad8dbf1 (diff)
usb: typec: ucsi: Prevent mode overrun
Sometimes the embedded controller firmware does not terminate the list of alternate modes that the partner supports in its response to the GET_ALTERNATE_MODES command. Instead the firmware returns the supported alternate modes over and over again until the driver stops requesting them. If that happens, the number of modes for each alternate mode will exceed the maximum 6 that is defined in the USB Power Delivery specification. Making sure that can't happen by adding a check for it. This fixes NULL pointer dereference that is caused by the overrun. Fixes: ad74b8649beaf ("usb: typec: ucsi: Preliminary support for alternate modes") Cc: [email protected] Reported-by: Zwane Mwaikambo <[email protected]> Signed-off-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions