mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 12:57:06 +09:00
staging: comedi: don't dereference user memory for INSN_INTTRIG
commit 5d06e3df28 upstream.
`parse_insn()` is dereferencing the user-space pointer `insn->data`
directly when handling the `INSN_INTTRIG` comedi instruction. It
shouldn't be using `insn->data` at all; it should be using the separate
`data` pointer passed to the function. Fix it.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e451b6d10c
commit
03acba6021
@@ -843,7 +843,7 @@ static int parse_insn(struct comedi_device *dev, struct comedi_insn *insn,
|
||||
ret = -EAGAIN;
|
||||
break;
|
||||
}
|
||||
ret = s->async->inttrig(dev, s, insn->data[0]);
|
||||
ret = s->async->inttrig(dev, s, data[0]);
|
||||
if (ret >= 0)
|
||||
ret = 1;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user