raw output

Sourceless proprietary junk^Wdriver

By jacobo, on 2006-8-26 at 21:41, under General

A new multifunction device (a Samsung SCX-4200) was recently bought at home. It “supports” Linux via a proprietary, binary-only driver that does not let you scan except as root. A normal user receives a Segmentation Fault. Of course, the installer “fixes” it by adding a setuid wrapper to xsane…

As I didn’t like that “solution” very much, I investigated a bit and learned that the Segfault happened after “scanimage -L” called the iopl() syscall. That call is used to be able to access I/O ports directly, and can only be called by a process running as root.

That driver’s name was “Unified Driver blah, blah, blah". That means that it “supports” a lot of multifunction devices, among them several that run plugged into the parallel port, and the driver was trying to detect a parallel port device by accessing the parallel port directly, and that’s why it called iopl().

After a couple of hours (I don’t do it every day, mind you) trying objdump and gdb and a hex editor (biew, which helpfully includes a disassembler too to guide you in your hex editing adventures) I managed to disable the parallel port check and make the driver a bit less insane (now I only need to make users who need to use the scanner members of the “lp” group).

I guess that it means that you don’t really need source code to modify your drivers and firmware (picture yourself a tongue well stuck to my cheek).

To be helpful I made the modified version, with instructions and HOWTO, available at http://jacobo.tarrio.org/code/scx4200/. Copyrights be damned, I shouldn’t have had to do it.


There is 1 comment for this post.

  1. Comment by Matthew W. S. Bell, on 2006-8-26 at 23:26 | permalink

    Hmmm. Copyrights be damned… but should someone whine about this to the company?

Sorry, the comment form is closed at this time.