bktr(4) risk?



While trying to resurrect meteor(4), I've been looking over the bktr
driver. It seems that the bktr driver implements the METEORSVIDEO ioctl,
which appears to allow userland programs to specify a physical memory
address to which the bktr hardware should dump it's output. At first
glance, this seems like a rather bad idea, as this would allow anyone armed
with the bktr file descriptor to arbitrarily trash any memory, and the bktr
device comes with a friendly default permission of 0444.

The only reason I can think of to use this ioctl would be if you wanted the
image you're capturing to be directly dumped into video memory. This
doesn't seem too useful a task for a video capture card to be doing.
Perhaps we should put a test for write access in there or just eliminate
the ioctl altogether. It should be noted that the meteor driver had this
ioctl ifdef'ed out prior to its removal.

Disclaimer: I don't have access to a bktr myself, nor am I very familiar
with the intricacies of DMA, so someone with the expertise or the hardware
should check my reasoning or test an exploit before panicing.


-Jon
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: bktr(4) risk?
    ... It seems that the bktr driver implements the METEORSVIDEO ioctl, ... with the bktr file descriptor to arbitrarily trash any memory, ... The only reason I can think of to use this ioctl would be if you wanted the ...
    (freebsd-hackers)
  • Re: dealing with interupt storms .....
    ... there is a problem in bktrgenerating interrupt storms. ... > run fine (I haven't been using bktr for long time so I didn't care). ... > problem is caused by something outside of the driver. ... > system performance is pretty affected until I unload bktr driver because ...
    (freebsd-current)
  • Re: ATI TV Wonder support
    ... On Nov 22, 2004, at 21:22, Anish Mistry wrote: ... >> This patch gives more or less full ATI TV Wonder support to the bktr ... Oh, you need to build it with the msp3400c driver, so add the line: ... include it in the patch, ...
    (freebsd-current)
  • Re: bktr now broken for me
    ... >>The most recent commit to bktr completely breaks the driver for me. ... I can override the tuner type when I compile the ...
    (freebsd-stable)