Slashdot Mirror


Major Security Hole In Samsung Linux Drivers

GerbilSoft writes with news of a major security hole in Samsung's proprietary Linux printer drivers. From the Ubuntu Forums: "Just to inform you about a recent post on the French Ubuntu forum about Samsung drivers (sorry, in French). [Google translation here.] It appears that Samsung unified drivers change rights on some parts of the system: After installing the drivers, applications may launch using root rights, without asking any password. What is more, you may be able to kill your system, by deleting system components, generally modifiable only by using sudo." GerbilSoft adds: "Among the programs that it sets as setuid-root are OpenOffice, xsane, and xscanimage."

47 of 295 comments (clear)

  1. Lazy Design... by Azuma+Hazuki · · Score: 5, Insightful

    This sounds like a cheap hack. There is no need for these things to be setuid root, not on the program level. Sounds like someone is used to programming Windows drivers...

    I'm tempted to infer something sinister about this, but then I remember the old adage "never attribute to malice what can be explained by stupidity." It keeps your blood pressure nice and low.

    --
    ~Eien no Inori wo Sasagete~ Searching for my Hatsumi...
    1. Re:Lazy Design... by EveryNickIsTaken · · Score: 4, Insightful

      Sounds like someone is used to programming Windows drivers... No, it merely confirms that there are lazy programmers creating crap code for all OSes, including Linux.
    2. Re:Lazy Design... by B'Trey · · Score: 3, Informative

      I can't tell you why the driver did what it did. However, from what I've read, the driver actually moves binaries to new locations and replaces them with a startup script which is set to run suid. That's way, way, way over the line. It breaks lots of stuff, like updates and patches. Someone doesn't deserver to be fired. Someone deserves to be tarred and feathered and banned from ever touching a computer again.

      --

      "The legitimate powers of government extend only to such acts as are injurious to others." Thomas Jefferson.

    3. Re:Lazy Design... by CastrTroy · · Score: 3, Insightful

      The employee should be fired. They are the one who actually made the mistake, and who has shown they have no abilities. Managers shouldn't have to take the all the blame for their employees mistakes. If the manager has had a bad track record and this kind of thing happens too often, then maybe he should get fired, but you can't make the judgement that the manager should get fired every time an employee screws up.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    4. Re:Lazy Design... by quanticle · · Score: 2, Informative

      In my opinion, the manager is responsible for the conduct of the employees. Taking responsibility for those working under you is a fundamental part of good leadership. Its the manager's job to check the employee's work to make sure that it meets quality criteria. In this case the manager failed in his or her supervisory duties.

      --
      We all know what to do, but we don't know how to get re-elected once we have done it
    5. Re:Lazy Design... by a.d.trick · · Score: 4, Interesting

      I think lazy is pretty generous. Putting setuid root on something as powerful as openoffice is flat-out retarded, period. These guys are driver writers, they should know better than this. I mean they, really ought to know better than this. It would be like Red hat dumping ssh and recommending telnet for remote shell access and transfer of sensitive information.

      I don't see any reason to think something malicious of it, but I think this goes beyond stupidity. It's not quite as bad as distributing rootkits with your CDs, but I think it's getting there.

    6. Re:Lazy Design... by Liquidrage · · Score: 3, Insightful

      A potential flaw in a linux driver from Samsung is blamed on MS, in 2 different manners no less, and it jets to +5.

      Classic /.

  2. Windows coders by erroneus · · Score: 5, Insightful

    If I'm not mistaken, this is how Windows got as bad as it is.

    This particular incident cannot be protested enough. If this sort of thing becomes common, End-user Linux will become as corrupted as Windows.

    1. Re:Windows coders by suv4x4 · · Score: 2, Interesting

      This particular incident cannot be protested enough. If this sort of thing becomes common, End-user Linux will become as corrupted as Windows.

      Your point is, Linux is good because only select people use it for select few apps. That's why Mac is good as well.

      I suppose this is an example of a self-defeating prophecy: it's secure/stable, so use it! But if many use it, it's no longer secure/stable.

    2. Re:Windows coders by erroneus · · Score: 5, Interesting

      No, that is not my point.

      As the PC developed, IO calls were to be linked through the BIOS. The idea was that each device was to have a ROM that linked itself to the system's BIOS and that there would be a more unified system for handling I/O. Well, for most people, BIOS wasn't fast enough so people started writing code to work around it. And that's where the PC's "bad programming habits" began and it just got worse from there.

      Now, instead of people using the Windows API properly, people are using undocumented APIs that are subject to undocumented change, people are still trying to squeeze more performance from their apps by moving code into ring-0 virtual driver code. If you don't already know, "ring-0" means the code has access to the entire machine and all memory. And when apps misbehave, they are flying without a net since the ring-1 and above offer levels of "protection" from misbehaving or malfunctioning apps.

      This culture of performance over stability and proper coding methods has undermined the security and stability of Windows. I'm not going to assert whether or not Microsoft is partly to blame or has any blame in this. But I will say that Windows coders have bad habits that are quite common and prevalent.

      As Linux coders grow in numbers, it is more and more important that things like abusing root or setting up kernel modules unnecessarily should be protested and prevented at every turn. To not fight it could result in the same problems and reputation that Windows now enjoys.

    3. Re:Windows coders by erroneus · · Score: 3, Interesting

      Signing drivers has been proven to be ineffective for several reasons:

      1. It has been shown that the signature can and has been forged
      2. Unsigned drivers are still installable with only a warning given to the user at install time and the user has little to no choice but to install the unsigned driver if they wish to make use of whatever it is they are using.

      the only benefit is "user awareness" and the effectiveness this may yield will vary by the quality of the user... and we more or less know what that leads to.

      As far as your assertion that Linux can't do that? I'll leave that alone for now... you're about to be flooded with a number of other responses that are likely to be worded better than I ever could. But to be short, Linux can't "sign" drivers. Instead driver modules are to be compiled to match the specific kernel and will refuse with NO option by the user to over-ride that decision. So in a way, it's actually more secure. (This excludes the existence of DKMS or dynamic kernel module support which, if the user installs it, can neatly override this particular behavior from the kernel in a way but the kernel module/driver itself needs to be created within the framework of DKMS itself and all manner of other complications...so....)

  3. suid is evil! by PetriBORG · · Score: 2, Informative
    Once more boys and girls, say it with me now, SUID IS EVIL! :-)
    Nothing but the programs that absolutely have to should be run as root.

    Is there an English (not some auto-translated forum) site covering this? I think its talking about this suid run printer driver?

    --
    Pete/Petri "damn, my chainsaw is clogged with 1's and 0's again." --clyde
    1. Re:suid is evil! by StripedCow · · Score: 2, Interesting

      And repeat after me: "proprietary" is even more evil than suid!

      --
      If Pandora's box is destined to be opened, *I* want to be the one to open it.
    2. Re:suid is evil! by nagora · · Score: 4, Informative
      Once more boys and girls, say it with me now, SUID IS EVIL! :-)

      SUID does not have to set id to root; my printing scripts are all setuid to "lp"; my mail servers are suid to "mail". This is a good thing.

      TWW

      --
      "Encyclopedia" is to "Wikipedia" what "Library" is to "Some people at a bus stop"
  4. Thank you! by mwvdlee · · Score: 4, Funny

    A big "Thank You!" to Samsung for demonstrating that propriatory code is inherently less secure than open source, if only because you can (could) get away with insecure code.

    --
    Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
  5. What were they trying to do? by Anonymous Coward · · Score: 2, Funny

    What were they trying to do that made them think OpenOffice needs to be setuid:root?

    Windows ME(tm)(r) Security(tm)(r)(c)(*) now available on Linux, brought to you by Samsung(tm)(r)

  6. Install applications as root by Simon+(S2) · · Score: 5, Interesting

    I find it very disappointing anyway that anything you install on ubuntu is installed as root (at least that is the default way of doing it). Wouldn't it be übercool to be able to install applications as the local user, and drivers maybe as the "driver" user? I still think The Zero Install system is a nice and secure way to install software, and maybe one day we can extend this to install drivers as well, so that root access will almost never be required (a bit like Plan 9, or what SE Linux is trying to do).

    --
    I just don't trust anything that bleeds for five days and doesn't die.
    1. Re:Install applications as root by vadim_t · · Score: 4, Interesting

      Wouldn't change much really.

      This works OK for a multiuser system. If you run systems with 100 users on each and one gets their home directory hosed, you restore from backups and problem solved. Everybody else continues having uninterrupted service meanwhile.

      But on a personal box everything of importance is in $HOME anyway.

      What is needed is something like SELinux, which makes it impossible for applications to do things they shouldn't be doing.

      I say "something like" because SELinux is a very complicated system and AFAIK still badly documented. But it sounds like a step in the right direction.

    2. Re:Install applications as root by MrNemesis · · Score: 3, Informative

      If you allow the local user to install programs, then the local user is either;
      a) going to need write access to all the usual locations (either /usr/bin and /usr/lib, or /opt) which wouldn't solve the problem TFA is on about
      b) going to need to use some middleware that *does* have rwx access to /usr and a fine grained ACL system dictacting which users have access to what

      "Driver" installs just need access to /lib.

      Fact of the matter is that whatever user/process has the rights to install apps has the rights to fuck them up as well. Much like how windows can't help it if the user runs trojan_setup.exe.

      As ther other poster noticed, things like SELinux offer incredibly fine grained access over what various users can and can't do, and if you go through the (fairly considerable) pain of setting it up it can give you an amazingly secure setup, but there's no way in hell it'd fly with everyday users or even most sysadmins. This is why Linux distros take such care with package management and like to retain control over their repositories - because they can't risk a third party, closed source package coming in and accidentally running a chmod -R 777 / on install. When you're dealing with companies that seemingly have little knowledge of Linux development and security models, this is a very real threat.

      --
      Moderation Total: -1 Troll, +3 Goat
    3. Re:Install applications as root by rbanffy · · Score: 3, Interesting

      Synaptic (and APT) are system-wide software-management tools and thus require root privileges. OTOH, it would be cool to be able to allow any user to install a program for himself and still keep it under package management.

  7. Re:How come an app can do that? by Xiph · · Score: 4, Informative

    It's a driver installation, so the ordinary user doesn't/can't do it.

    However, it's a proprietary driver, that you need to install to use the printer, so if that's the printer you have people install it, expecting it not to create security holes.
    This might have been discovered earlier, if it weren't for the closedness of the source.

    My guess is that it happened due to a coder writing the driver so, it requires root to use it.
    Then trying to guess which programs requires the driver, then setting those to run as root. Silly, but easy to do.

    Sounds like it was done without peer review, so i guess they only have one guy writing their linux drivers..
    So why is it proprietary? well some places printers are encouraged(required) by law (enforcement) to leave secret and invisible watermarks.
    If it isn't done in the printer, it's done in the driver, if it's open, it'll be removed.

    --
    Blah blah sig blah blah blah irony blah blah
  8. Re:How come an app can do that? by PetriBORG · · Score: 2, Insightful

    It seems extremely dangerous that a user can install something like that, with that kind of effects. Very insecure indeed. Can anyone explain why in the whole world something like this could ever happen, or is in fact an exploit/virus/worm? It will require root privs to set up in the first place. It comes from the old UNIX method that "if you are privileged enough to have root, you should damn well know what you're doing." mindset. The problem is that apt-get, etc almost all require "root" or wheel access anyway to run. That means you're running a lot of program installers as root that probably you don't really trust enough to install in all parts of the system (see this as an example).
    --
    Pete/Petri "damn, my chainsaw is clogged with 1's and 0's again." --clyde
  9. Re:How come an app can do that? by Anonymous Coward · · Score: 4, Insightful

    An app running as root can do anything it wants - and installers normally do run as root. The same problem exists on every OS: the administrator and the programs he runs can do retarded things.

    The question I want to ask is why there is a driver developer working for Samsung who is able to understand the function of the setuid bit but not the security implications of using it. It seems that there is a very special type of stupidity involved here, along with some extremely thoughtless design. Samsung is taking a big risk employing morons like that.

    If the guy can't understand the security implications of the setuid bit, which are well documented and not that complex, he should not be writing software.

  10. Re:How come an app can do that? by plague3106 · · Score: 2, Insightful

    This might have been discovered earlier, if it weren't for the closedness of the source.

    Really? It could not have been detected by noticing that OpenOffice is not SetUID? I believe there is even a package for linux that monitors binaries in /bin, /usr, etc. and notifies you immediately if permissions have changed for anything. I know such a package was available for RedHat when I was using that. That could not have detected this sooner?

    Stop with your lame "thousand eyes" theory. Apparently those thousand eyes couldn't see a permissions change on their own systems.

  11. It come out... by dmayle · · Score: 4, Informative

    For those who can't read French, the Ubuntu forum is just a posting of a link to another forum where it was noticed. The posting, along with the interesting source can be found at http://linuxfr.org/forums/15/22562.html The interesting parts are:

    wrap_setuid_third_party_application xsane
    wrap_setuid_third_party_application xscanimage

    wrap_setuid_ooo_application soffice
    wrap_setuid_ooo_application swriter
    wrap_setuid_ooo_application simpress
    wrap_setuid_ooo_application scalc

    The script copies the affected application's executable to one with a .bin extension, and replaces it with an suid wrapper script. This is undoable, but god, what a mess!

    Okay, I couldn't overcome the lameness filter, go to the source to see for yourselves...

  12. Re:How come an app can do that? by Anonymous Coward · · Score: 2, Insightful

    Stop with your lame "thousand eyes" theory. Apparently those thousand eyes couldn't see a permissions change on their own systems.

    But it's been seen. Is that then proof of the thousand eyes theory?

    (you fucking idiot)

  13. Re:to be fair by Anonymous Coward · · Score: 5, Insightful

    no user is going to be able to install such a dangerous "driver" without root access in the first place-- anyone can build a program, intentionally or accidently, that comprimises a system when ran/installed as root

    Yes, but when you install a driver, you normally assume that it's not going to make your system insecure. Why should it? Only a very badly designed driver would deliberately break your system security.

    Sometimes drivers do accidentally introduce security problems. The Nvidia drivers for X have done this in the past, for example. In those cases, it's not bad design, it's an oversight of some sort, like a buffer overflow.

    But this is not an oversight. A deliberate design decision has been made to break the Linux security model. A very special type of stupidity is involved: one that includes an understanding of the effects of the setuid bit, but excludes an understanding of the security implications.

    Samsung should investigate this fully - who knows what other retarded decisions have been made by these guys?

  14. I agree, BUT by PetriBORG · · Score: 5, Insightful
    I agree with what you said, BUT...

    Stop with your lame "thousand eyes" theory. Apparently those thousand eyes couldn't see a permissions change on their own systems. This is uncalled for, because as can be see on the ubuntu forums you can clearly see it was the "thousand eyes" reality that caught this problem in the first place and found the solution to remove parts from the install script.

    wrap_setuid_third_party_application xsane
    wrap_setuid_third_party_application xscanimage
    wrap_setuid_ooo_application soffice
    wrap_setuid_ooo_application swriter
    wrap_setuid_ooo_application simpress
    wrap_setuid_ooo_application scalc
    And the content of the function for suid-making functions etc. So I have to disagree with you there.

    I also agree with you though that linux distros should be automatically building in some sort of tripwire type setup to protect important system segments from scripts that are like this.

    --
    Pete/Petri "damn, my chainsaw is clogged with 1's and 0's again." --clyde
  15. Flawed Design... by krischik · · Score: 2, Informative

    Only when the little bugger of an hotplug-manager changes the user id for the scanner device to the logged on user. Which still only gives one user access to the scanner. Have my Wife remote logged in and only one of us can use the scanner.

    Unix security if just flawed and the flaw is called "root".

    Martin

    1. Re:Flawed Design... by Anonymous Coward · · Score: 2, Informative

      Maybe you should turn off the hotplug manager, or reconfigure it so it doesn't manage your scanner device? Why not set the scanner device to be owned by a group consisting of yourself and your wife? Then you could both use it, and neither of you would need to be root, and you wouldn't need any setuid binaries.

    2. Re:Flawed Design... by morgan_greywolf · · Score: 5, Informative
      I'm going to reply to your post backwards, but you'll see why.

      Unix security if just flawed and the flaw is called "root".


      There is a fix for this flaw. It's called 'groups.'

      Only when the little bugger of an hotplug-manager changes the user id for the scanner device to the logged on user. Which still only gives one user access to the scanner. Have my Wife remote logged in and only one of us can use the scanner.


      This is distro-dependant. On Ubuntu, scanner access is controlled by groups. Want a user to be able to scan? You add them to the scanner group. You want someone to have access to burn CDs/DVDs? You add them to the cdrom group. If the scanner device is owned by any user, and owned by the group scanner, the permissions on the scanning device are set to group read/write, and both you and your wife are in the scanner group, then you both have access to the scanner. Try it yourself. Problem solved.

      BTW--with SANE, the best way to have two people access the same scanner is via the saned network sharing mechanism, which allows other systems using xsane (or other sane front-end) to access the scanner over the network without having to remote login.
    3. Re:Flawed Design... by GooberToo · · Score: 3, Insightful

      Which is why most distros support POSIX ACLs...they are just not widely used. Ext2, Ext3, JFS, XFS, and ReiserFS all support ACLs (extended attributes). I believe NFS version 3 and 4 also support ACLs.

      There are of course some other areas which ACL's don't address but there are pre-existing mechanisms to address those as well. Well, on most modern Unix/Linux systems anyways. The model has survived for so long for simple reasons; it's effective, simple and covers the vast majority of situations. When complex requirements come into light, more complex solutions exist. Most people just don't know about them.

    4. Re:Flawed Design... by MyIS · · Score: 2, Interesting

      The GGP post was citing the scanner situation as evidence for the "flaw of the superuser". The GP post explained why that evidence is not applicable, as it is solvable with standard practices of any well-managed distro. There is little point in saying that "groups don't fix the flaw of a superuser", since the GP explained exactly how groups *do* fix at least part of that "flaw".

      Personally, I think that standard Unix security model is complicated enough as it is without using ACLs. Not to say that ACLs aren't elegant and neat sometimes, but in *real world use* the problems they are supposed to fix are handled in a fuller and more comprehensive way by running an insulating control daemon, virtualization, etc. If you want a secure, locked-down box, you don't allow direct unprivileged user access to it anyway, running public-facing daemons in chroot. If you want a multi-tenant general-purpose server, there are plenty of options for light, fast virtualization and process containment (same old chroot, even) - otherwise users can muck up enough things even with strict ACLs through DDOS, etc. If you are running a personal computer, the standard "god mode versus user mode" security model is more than enough - it is simply easier to be prepared for a wipe and reinstall, which ends up being necessary even with ACLs due to general ways how our desktop computers accumulate cruft.

      ACLs are an attempt to tack on semantics onto files - which is better handled in application code, instead of complicating general-purpose code. Simply a university-borne solution to a problem that should be obviated with other tools in the first place.

      --
      http://zero-to-enterprise.blogspot.com/
    5. Re:Flawed Design... by DrSkwid · · Score: 2, Interesting

      Root is a design fault.

      That's why the inventors of Unix took it back out again when they did their next OS

      btw. it's dependent

      --
      There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
    6. Re:Flawed Design... by mgpeter · · Score: 2, Interesting

      Which is why most distros support POSIX ACLs...they are just not widely used. Ext2, Ext3, JFS, XFS, and ReiserFS all support ACLs (extended attributes). I believe NFS version 3 and 4 also support ACLs. why most distros support POSIX ACLs...they are just not widely used. Ext2, Ext3, JFS, XFS, and ReiserFS all support ACLs (extended attributes). I believe NFS version 3 and 4 also support ACLs.

      True, but until most GNU/Linux applications fully support ACLs, I highly recommend not using them and sticking with controlling access through Groups instead. Similar results to ACLs can eaily be obtained through groups by changing the umask of your users to 002, creating a directory to share, change the group ownership, then make it writable and setgid (chmod g+ws) for the group.

  16. Re:Red Alert! by CopaceticOpus · · Score: 2, Insightful

    In all seriousness, I would like to know the business case for not open sourcing these drivers. It seems to me they have everything to gain and nothing to lose. I can't imagine there's any significant technological secrets contained in the drivers themselves. The value they are selling is in the physical printers, and the drivers are just there to make the printers useful.

    Why not open the drivers to a free process that will almost certainly improve them, and at the same time improve the company's image in the Linux community?

  17. Re:Linux security by siride · · Score: 2, Insightful

    That's quite the misinterpretation of the name Unix. It really was just a joke: "Unix is one of whatever Multics is many of". It doesn't have anything to do with whether the system is multi-user or not. Unix is most definitely a multi-user system. The old style permissions are definitely becoming a problem, but there are solutions such as ACLs, SELinux and beyond. They have just yet to be used in any great degree on the desktop Linuxes. Perhaps incidents like this will push Linux distributors to start using these technologies. BTW, for your little problem, just make sure you are in the disk group and everything will work. That's the whole point of why it is set that way...so that only users who are in that group can access the device (or root), and users outside of the group can't. Admittedly, it probably shouldn't be disk. That's a udev problem, but that can be fixed in a config file, which sets permissions and ownership for device nodes.

  18. English Non-Google'd Translation by VE3OGG · · Score: 3, Informative
    Hello,

    After I installed the unified drivers for my Samsung printer/scanner, I had the unwelcome surprise of discovering that OpenOffice now opens as root, and not only that but did not ask for my password!

    As a result, all documents I created were saved in the /root/ directory with super user rights. Practical and super secure!

    I attempted to re-install .Xauthority without success.

    The beast (the problem) is occuring under Ubuntu 7.04 under Gnome.

    Thank You.

    Bonjour,

    Après avoir installé les drivers unifiés de Samsung pour gérer mon imprimante scanner, j'ai eu la très mauvaise surprise de constater que la suite openoffice s'ouvrait en root et ceci sans que me soit demandé le moindre mot de passe !!!

    Du coup, les documents que je crée s'enregistrent dans le dossier /root/ avec des droits de super utilisateur. Pratique et super sécure !

    A tout hasard j'ai réinitialisé le .Xauthority : aucun succès.

    La bête est sous Ubuntu 7.04 et gnome. En attendant vote aide, je cherche et tente de résister au désespoir le plus sombre !

    Merci
  19. Time to Get Heavy by ajs318 · · Score: 4, Insightful

    The proprietary driver fiasco has gone on far too long. It's time to stand up and say Enough Already!

    Let's all get writing to our elected representatives and demand that hardware manufacturers be obliged, by law, to provide detailed specifications which would enable a sufficiently-competent programmer to write a driver program enabling any of the features of their product to be used on any sufficiently-capable computer.

    Failure to do this places the rightful owners of hardware at a disadvantage. They can only use it in conjunction with certain Operating Systems. They are restricted to using it as the manufacturer thought fit. If a driver has a programming flaw, the user's computer can be compromised. If the Operating System is updated in such a way as the driver no longer works, the user is at the mercy of the manufacturer to release a new version of the driver -- or else the hardware is unusable (or at best, usable only through a bodge involving multi-booting: at the boot prompt, type linux to be able to use the Internet, or linuxOLD to be able to print).

    It's unfortunate, but this measure really needs to be brought in through legislation, because manufacturers will not do it voluntarily. There are two reasons: (1) they are paranoid of competitors {despite the fact that their competitors are busy reverse-engineering their products in secret while they reverse-engineer the competitors' products} and (2) they habitually lie through their back teeth in their advertising literature about the capabilities of their hardware, and such lies would be exposed with disclosure (e.g. a camera with a 2 megapixel image sensor, spitting out JPEG images interpolated up to 6 megapixels).

    --
    Je fume. Tu fumes. Nous fûmes!
    1. Re:Time to Get Heavy by Xeth · · Score: 2, Funny

      +4, funny? Ouch. I guess we are a cynical bunch. Next up: The "-1, Pointless idealism" mod?

      --
      If your theory is different from practice, then your theory is wrong.
  20. Re:Moronic Managers by thegrassyknowl · · Score: 2, Insightful

    I deal with this kind of crap in embedded Linux installs daily. Managers and marketoids want to do all sorts of insanely stupid things under the guise of "making it easy for the customer to configure the device within a maximum of 5 minutes with no technical knowledge", etc.

    In the mean time the fallout from all the insane things that "need" to be done is gaping security holes all over the place and a bunch of manager types saying 'but it doesn't matter, nobody will ever want to hack us'.

    For the record I used to work for a company which built Internet-accessible security products. Whenever there was a breach it was always my fault even though I told them that enabling a particular service to the greater world was risky and would require constant attention by a qualified Linux admin and also require a regular mandatory update schedule and code reviews to continue some level of security. They never wanted to do the regular updates or code reviews because it was so costly and updates inconvenience the customer (I'm sure less than a r00ted box, but explain that to marketoids).

    Suffice to say I quit that job and am starting another with a company that actually cares about security over customer friendliness (and cares about their employees at least as much as their profit margin).

    --
    I drink to make other people interesting!
  21. Blown out of proportion? by Jerry · · Score: 4, Informative
    Here is a posting to the Ubuntu forum that is SEVEN MONTHS old and refers to postings A YEAR OLD!

    Printer drivers need to be installed with world execute permissions so that all users on the system can access the printer. The Samsung hacker's method of doing this, converting them to 4755 bin files and setting the original name as a link to the bin files, is one way of doing that -- IF his "unwrap" function had worked properly. That's the bug. Listed in the posting are files whose permissions need to be modified after the driver is installed.

    #1
    Old January 18th, 2007
    tweedledee tweedledee is online now
    Way Too Much Ubuntu

    Join Date: Dec 2006
    Beans: 252
    Ubuntu 7.04 Feisty Fawn User
    HOWTO Install Samsung Unified Printer Driver
    I had a fair amount of trouble initially getting my Samsung printer installed completely, but I finally have it all done, so here's a mini-guide for those who might benefit.

    NOTE: for the last few months, the Samsung website has been utilizing some buggy Flash code that will crash many (all?) Linux browsers that have Flash installed - hopefully they will fix this soon, but they don't seem in any hurry. Either use a secondary browser that does not have the Flash plugin installed (e.g., if you mainly use Firefox, you could use Epiphany (Gnome) or Konqueror (KDE)) or download the drivers via another computer/OS. Alternatively, again if you use Firefox, you can install the "flashblock" extension, usually this prevents the crash (and is useful for many of the other websites that have been appearing recently causing the same behavior, although it's not 100% successful).

    EDIT: The newest (as of this writing) driver from Samsung (20070324...) appears to solve some of the mfp/xsane issues, but also appears to missing a couple of library files. See post #23 for details. Also see posts #27-29 for details on ...plc errors and solutions.
    Post #35 suggets the 200704.... drivers have resolved this issue, so this may now be irrelevant.

    First, a disclaimer: much of the information I used came from this thread: http://www.ubuntuforums.org/showthread.php?t=28774 7. Another good source of information is http://www.linuxprinting.org./ Finally, I did this using the 20060719... and 20070125.... drivers; newer (or older) drivers may require some tweaks. Also, especially if you have a monochrome, non-duplexing, non-multifunction printer, you very well may have success with a generic post-script printer as a driver, without having to install the Samsung drivers. Also note that for my printer, pretty much all functions except duplex control worked even if I skipped steps 2-4 below (i.e., don't install the driver, only the relevant .ppd file) - which also has the advantage of not needing to fix xsane (additional step 2).

    This works for my CLP-550; similar steps seem to work for other Samsung printers not supported out-of-the-box with the drivers available in a fresh Ubuntu install. This is NOT a multi-function, multi-functions may require additional steps (but are discussed in other threads, a quick search should bring them up). Posts below from other users have reported sucess (sometimes with a couple of small modifications) with: ML-2510 (# 5, 14, 16, 26), ML-2510/XEU (# 18 ), ML-2571n (# 12), SCX-4200 (# 10), SCX-4521F (# 11), CLP-300 (# 35).

    1. Download and untar the driver from Samsung's website; for this example I will assume you untar it to ~.
    2. Open a terminal and navigate to ~/cdroot/Linux. I had to "chmod +w install.sh" to give write permissions, but that may be unusual. Edit install.sh as follows:
    a: change the first line from "#! /bin/sh" to "#! /bin/bash" (without the quotes)
    b (possibly not needed): change the line that includes "guiinstall.bin" (search for it, it's around line 1277) to eliminate the ".bin" (i.e

    --

    Running with Linux for over 20 years!

  22. It also messes with the lpr command by jim9000 · · Score: 2, Interesting

    I have a Samsung ML-2251N printer and the installer also replaces the standard lpr command by symlinking it to a script called slpr, which brings up a windows-like print GUI when you try to print things. This is highly annoying as it doesn't behave exactly like lpr and requires a GUI. It may also be SUID as well.

    You can remove all of the SUID crap and point /usr/bin/lpr back to the right place. The proprietary driver still works and is much more secure. It prints faster with the Samsung driver than with the open source PCL driver. One day I might add true PostScript capabilities to it to try to work around both issues.

    Keep in mind that the printer driver's control panel and other stuff that Samsung installs is also SUID. The SUID garbage happens even when installing a regular printer without the scanning capabilities.

    I like that they at least tried to write a Linux driver, which is many steps further than a lot of companies, but it does need to stop stomping all over the system like a Windows application would.

  23. The bug is that it doesn't properly UN-SUID them. by Varka · · Score: 2, Informative

    The bug is that the driver actually tries to UN-suid the applications: unwrap_setuid_third_party_application xsane unwrap_setuid_third_party_application xscanimage wrap_setuid_ooo_application soffice un wrap_setuid_ooo_application swriter un wrap_setuid_ooo_application simpress un wrap_setuid_ooo_application scalc un But they screwed up the oo unwrap part. The "un" should be BEFORE the "wrap" on those lines. It suids the apps temporarily, and improperly un-suids them.

  24. Re:Without knowing much than what is in the articl by east+coast · · Score: 4, Insightful

    This was an intentional attempt to create a backdoor.

    So when this same type of thing happens in Windows it's that Windows coders are inept but when the same happens in Linux it's because of a conspiracy? Please.

    The Linux community better be damn well ready for when this becomes commonplace as more people use Linux. I don't expect it as much from real vendors but it's going to happen more from the likes of amateur coders and malware producers.

    Too many have fallen pray to the myth that Linux isn't going to have some of the same issues that Windows has with these areas in software. This incident alone shows that Linux will not be immune to those who don't care enough, don't know enough or are willing enough to sacrifice system security for whatever reasons.

    --
    Dedicated Cthulhu Cultist since 4523 BC.
  25. What's the purpose of this [expletive deleted]? by argent · · Score: 2, Interesting

    It suids the apps temporarily, and improperly un-suids them.

    OK, I read this message, and I can't understand why on earth any software would need to, even temporarily, set the setuid bit on anyone else's software. What's the purpose of this action?

  26. If it wasn't a management decision to start with by Moraelin · · Score: 2, Informative

    I wouldn't be too surprised if something like this was a management decision to start with. Someone figured out they'd save some money on tech support calls, for example, if the users don't have to keep calling with stuff like "why does this ask for a password when I want to change the printer?" and "does your driver have a virus? my grandson said I should beware stuff that asks for a password" (for bonus points: "... and he didn't tell me the password anyway. Can I still use the printer?") and the like. Don't underestimate the kind of dumb decisions that get taken in the name of cost cutting.

    And that includes the fact that it probably wasn't a programmer/architect that made the installer anyway. The drive for cost cutting includes the idea of giving each job to the lowest wage monkey who can possibly do it. So it's not entirely unheard of to offload to the cheapest interns or even to underused non-technical members of the team stuff like making an installer or writing the test cases.

    In which case probably some under-paid and under-skilled monkey got the honour of figuring out how to install that stuff in Linux. These aren't typically the kind of guys you'd ask to do a security analysis and design, and they're not given ample times and funds for research either. So he'll google if he has a problem (like how to make some nice config dialog modify a file that was installed as writable by root only), and take the first thing that sorta looks like a solution.

    Plus a few other such fun ways to fuck up in the name of keeping the costs down.

    Mind you, I'm not saying this has to be what happened at Samsung. Just saying that I've seen that and worse happening in other places, so I wouldn't be too surprised.

    --
    A polar bear is a cartesian bear after a coordinate transform.