Skip to content
Commit 7e5b021b authored by Andrew Boie's avatar Andrew Boie Committed by Andrew Boie
Browse files

drivers: adc: fix TOCTOU attacks



The toplevel adc_seq_table is now copied onto the stack and
the stack copy used.

The contained entries array is now copied onto an allocation
drawn from the caller's resource pool, to prevent modification
of the buffer pointers.

The return value policy here is to oops the caller if bad memory
or objects are passed in, but return an error otherwise.

Based on an original patch by Leandro Pereira, rebased and the
copy of the entries array added.

Signed-off-by: default avatarAndrew Boie <andrew.p.boie@intel.com>
parent 4687c989
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment