stm: Potential read overflow in stm_char_policy_set_ioctl()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 10 Aug 2017 12:45:10 +0000 (15:45 +0300)
committerAlexander Shishkin <alexander.shishkin@linux.intel.com>
Fri, 25 Aug 2017 14:58:33 +0000 (17:58 +0300)
commit71c488f32b071bfb5cfe9ddf682cd2e0c310c75d
tree482f84d4198c043cfd7f7540438362a25aa73d05
parent5771a8c08880cdca3bfb4a3fc6d309d6bba20877
stm: Potential read overflow in stm_char_policy_set_ioctl()

The "size" variable comes from the user so we need to verify that it's
large enough to hold an stp_policy_id struct.

Fixes: 7bd1d4093c2f ("stm class: Introduce an abstraction for System Trace Module devices")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
drivers/hwtracing/stm/core.c