aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorAnant Thazhemadam <[email protected]>2020-11-04 03:09:05 +0530
committerMarc Kleine-Budde <[email protected]>2020-11-15 18:17:04 +0100
commitc8c958a58fc67f353289986850a0edf553435702 (patch)
tree60091d3a07e522b81ed5dd62ce67ffcd0e291747 /tools/perf/scripts/python
parentceb736e1d45c253f5e86b185ca9b497cdd43063f (diff)
can: af_can: prevent potential access of uninitialized member in can_rcv()
In can_rcv(), cfd->len is uninitialized when skb->len = 0, and this uninitialized cfd->len is accessed nonetheless by pr_warn_once(). Fix this uninitialized variable access by checking cfd->len's validity condition (cfd->len > CAN_MAX_DLEN) separately after the skb->len's condition is checked, and appropriately modify the log messages that are generated as well. In case either of the required conditions fail, the skb is freed and NET_RX_DROP is returned, same as before. Fixes: 8cb68751c115 ("can: af_can: can_rcv(): replace WARN_ONCE by pr_warn_once") Reported-by: [email protected] Tested-by: Anant Thazhemadam <[email protected]> Signed-off-by: Anant Thazhemadam <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions