aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/net_dropmonitor.py
diff options
context:
space:
mode:
authorTakashi Iwai <[email protected]>2023-09-22 14:38:07 +0200
committerHans Verkuil <[email protected]>2023-10-07 10:55:48 +0200
commita1766a4fd83befa0b34d932d532e7ebb7fab1fa7 (patch)
treeaf1a821d7b2fb735b8dd2b63f01174ca700cddbf /tools/perf/scripts/python/net_dropmonitor.py
parent462e108bac18419f17c6a34eb348b600a614aa4f (diff)
media: imon: fix access to invalid resource for the second interface
imon driver probes two USB interfaces, and at the probe of the second interface, the driver assumes blindly that the first interface got bound with the same imon driver. It's usually true, but it's still possible that the first interface is bound with another driver via a malformed descriptor. Then it may lead to a memory corruption, as spotted by syzkaller; imon driver accesses the data from drvdata as struct imon_context object although it's a completely different one that was assigned by another driver. This patch adds a sanity check -- whether the first interface is really bound with the imon driver or not -- for avoiding the problem above at the probe time. Reported-by: [email protected] Closes: https://lore.kernel.org/all/[email protected]/ Tested-by: Ricardo B. Marliere <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]> Signed-off-by: Sean Young <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions