Slashdot Mirror


Security Problems Are Primarily Just Bugs, Linus Torvalds Says (iu.edu)

Linus Torvalds, in his signature voice: Some security people have scoffed at me when I say that security problems are primarily "just bugs." Those security people are f*cking morons. Because honestly, the kind of security person who doesn't accept that security problems are primarily just bugs, I don't want to work with. Security firm Errata Security has defended Linus's point of view.

272 comments

  1. They're bugs, unless they're not by DontBeAMoran · · Score: 4, Insightful

    Security by obscurity, government backdoors, etc. Those are not bugs.

    --
    #DeleteFacebook
    1. Re:They're bugs, unless they're not by Anonymous Coward · · Score: 1, Insightful

      Maybe not code bugs per say, but clearly the release/review process has some bugs in it if you are able to get those things into production code.

    2. Re:They're bugs, unless they're not by DontBeAMoran · · Score: 0

      If your OS is not open-source, forget release/review processes. If the NSA tells you to add this black box of code, you fucking do it.

      --
      #DeleteFacebook
    3. Re:They're bugs, unless they're not by retchdog · · Score: 1

      that works for open source too, it's just trickier.

      --
      "They were pure niggers." – Noam Chomsky
    4. Re: They're bugs, unless they're not by Anonymous Coward · · Score: 1

      Yeah, because no NSA code has made it into Linux and other open source projects... Oops, there's SELinux, and no indication that anyone has thoroughly reviewed it to ensure there aren't any NSA backdoors. We'll pretend like this doesn't exist, because it doesn't support our argument against closed source software

    5. Re: They're bugs, unless they're not by Anonymous Coward · · Score: 0

      Very true. SELinux could be an NSA backdoor built right into the Linux kernel.

    6. Re: They're bugs, unless they're not by retchdog · · Score: 1

      yeah, but it probably isn't. there would be much smarter, more widely-deployed, and more cost-effective ways to do it.

      selinux is just easy for people to think of because it was designed by the NSA to scratch their particular bureaucratic itch. but, sure, anything is possible.

      --
      "They were pure niggers." – Noam Chomsky
    7. Re: They're bugs, unless they're not by Narcocide · · Score: 3, Interesting

      The backdoor in SELinux isn't in the code, it's in the setup documentation.

    8. Re: They're bugs, unless they're not by Anonymous Coward · · Score: 0

      Who needs SELinux when they have the Intel Management (Exploit) Engine? Sure push unsigned firmware right into the box go ahead may your day.

    9. Re:They're bugs, unless they're not by iserlohn · · Score: 1

      That's not what Linus is talking about either. Stop grinding axe at every opportunity.

    10. Re:They're bugs, unless they're not by Greyfox · · Score: 2

      They are bugs. They're just bugs in how you designed your government.

      --

      I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

    11. Re:They're bugs, unless they're not by Anonymous Coward · · Score: 0

      Then there's just plain and simple paranoia.

    12. Re:They're bugs, unless they're not by AmiMoJo · · Score: 4, Funny

      With Linus it's more like security through obscenity :-)

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    13. Re: They're bugs, unless they're not by Anonymous Coward · · Score: 0

      If I were the US government I would just hire a bunch of devs to submit tons of good code to the Linux kernel until they're fairly well trusted then have them sneak things in that when combined create a back door. If you think that's hard or impossible just look to the underhanded c competition. You can sneak some pretty crazy things in to code if you know what you're doing. SELinux would be the last place I would put a back door. Tons of people have already looked over the source code trying to find it. Plus a lot of people disable it because they're scared of it.

    14. Re:They're bugs, unless they're not by K.+S.+Kyosuke · · Score: 1

      Those are human bugs.

      --
      Ezekiel 23:20
    15. Re: They're bugs, unless they're not by mspohr · · Score: 1

      Other than the fact that it has been extensively security reviewed by independent people...
      https://security.stackexchange...
      https://www.androidauthority.c...
      https://www.reddit.com/r/linux...

      --
      I don't read your sig. Why are you reading mine?
    16. Re:They're bugs, unless they're not by Anonymous Coward · · Score: 0

      Historically, tracking devices, wiretaps, microphones, and even backdoors in software are still called "bugs" by some current, and veteran members of the intelligence community.

    17. Re:They're bugs, unless they're not by Anonymous Coward · · Score: 0

      The bug is in the architecture or specification and needs to be redone from the ground up to address, but hey it's still just a bug - yah I get it...

    18. Re:They're bugs, unless they're not by nine-times · · Score: 2

      It seems like he wasn't actually saying "all security problems are just bugs" in the abstract. He's saying that, in the development of the kernel, security problems should be treated the same as a bug. That is, basically, you shouldn't freak out and make patching those bugs your only priority, breaking other things as you go.

      In the world of all security problems, there are security problems that are not "just bugs". However, in the world of developing the Linux kernel, he's saying, "A bug that causes a security hole is still just a bug, and shouldn't be treated in a special way just because you're freaking out that there's a security hole."

    19. Re:They're bugs, unless they're not by Anonymous Coward · · Score: 0

      It's not a bug, it's a feature!

    20. Re: They're bugs, unless they're not by Anonymous Coward · · Score: 0

      We must assume exactly THIS happens.

    21. Re:They're bugs, unless they're not by Anonymous Coward · · Score: 0

      Well, most successful security is done through the threat of violence.
      "If you don't stop trying to break in I'm gonna bash your head in!"
      It works perfectly fine against internet threats too if you can track the offender down.

    22. Re: They're bugs, unless they're not by Anonymous Coward · · Score: 0

      Whatever. The point is that to write secure code you first have to be able to write correct (bug free) code that implements a correct (bug free) design that itself doesn't have security flaws. After you've done that you will realize that you're done. Then you can take the same skill and write security features, like authentication or access control.

    23. Re: They're bugs, unless they're not by LostMyBeaver · · Score: 1

      To be honest, there are some better ways to do this which are far smarter.

      1) Alter the code to the e1000 driver to add a creative code injection opportunity. This would open probably a hundred million of virtual machines to attack. This can be done by making what looks like power management code.

      2) Alter the VMXNet3 driver which is already some of the worst code in the Linux kernel with what looks like a security fix but is really another code injection.

      3) Alter code throughout the kernel to start aligning data into predictable buffer positions. This would allow code injection as well.

      See the thing is, what you really want is layer-2 network code injection. Almost all commercial firewalls and IPS systems today run Linux and they almost all run virtual (even when run on appliances). If you can identify an IP address on the other side of the firewall (should be easy) and the firewall is running in transparent mode, then the goal is to attack the firewall before a bad packet is forwarded to the actual firewalling code.. A perfect code injection for example would upload a small IP stack (think 1-1.4KB in size) that contains enough code to respond to specific messages for a routed IP as well as a specific port. This is pretty simple to do if the code is compiled with hard coded addresses at the attacker's machine.

      Then, once there's a means of communicating with the firewall from kernel mode, it's just a matter of allocating some more memory, uploading a larger program and then forwarding packets to and from that program in the kernel. Then there's totally untraceable packets bypassing all security and providing an open door. Since most companies (**cough Cisco for example cough**) sell firewalls to companies and claim "contexts are just as good as separate devices", many companies use the same firewall for edge as the do for internal traffic. The firewall can then be used to snoop all contexts easily.

      So... that said, adding a "Feature or Fix" to a kernel mode driver like e1000 is ideal for supplying a somewhat unauditable trojan.

      No matter how good Linus is, if you build a repertoire for making good kernel fixes for something like power management on older drivers, within a few months, you'll build enough trust with him that he'll start accepting your changes based on your reputation as a good and reasonable coder more than the individual lines of code themselves. It is absolutely obvious that there is no possible way that every new line of Linux code can be properly reviewed. I revisit the source code submitted by VMware as evidence of that... they really made a LOT of bad code... a total shame it looks like it started off nice, but then I think they started using cheap immigrant labor for their changes and the quality control dropped substantially.

    24. Re:They're bugs, unless they're not by RockDoctor · · Score: 1

      Is Linus still involved in non-OS operating systems? I recall he was working for several years in the firmware of some software-controlled hardware platform, but I don't know what the current state is.

      --
      Birds are not dinosaur descendants;birds are dinosaurs, for all useful meanings of "birds", "are" and "dinosaurs"
  2. True, but. by XXongo · · Score: 3, Interesting

    It's true, security problems usually exploit a bug. BUT, in general, there is a systematic problem underneath the bug, which allows a bug in a program to escalate to gain access to root-level systems. So, it's not just a bug, but a bug that is built on a system that does not have security built in.

    1. Re:True, but. by ranton · · Score: 1

      It's true, security problems usually exploit a bug. BUT, in general, there is a systematic problem underneath the bug, which allows a bug in a program to escalate to gain access to root-level systems. So, it's not just a bug, but a bug that is built on a system that does not have security built in.

      I am assuming Torvalds considers not building security into a system is a bug. Consider software which does not prevent SQL injection attacks. If there was no attempt to prevent these attacks, technically the code is working as intended. Security simply was not a consideration. But in practice I believe it is still fair to consider that a bug.

      --
      -- All that is necessary for the triumph of evil is that good men do nothing. -- Edmund Burke
    2. Re:True, but. by DontBeAMoran · · Score: 1

      Aren't SQL injection attacks usually queued commands? Isn't the ability to queue multiple SQL commands in one string a flaw in itself? Ex: what possible harm would it do to require a "drop table" command to be called on its own,etc ?

      --
      #DeleteFacebook
    3. Re:True, but. by sinij · · Score: 2

      I disagree that you can view lack of security as a bug. Using your example, lets say a novel way to attack databases developed in 2018. Lets call it relationship mutations. Today we have no idea how it works and how to defend against it, because it isn't invented yet. Are all databases released today buggy as a result? Do they become buggy, without any code change whatsoever, at the time this new exploit is invented?

    4. Re:True, but. by Junta · · Score: 1

      The same can be said of functional bugs, they are buggy, but you don't know it until discovered. The discovery of the bug does not mean the code changed, it means that bug hadn't been caught yet.

      So yes, a system that is vulnerable to an as-yet unknown attack is buggy.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    5. Re:True, but. by Anonymous Coward · · Score: 0

      The bug there is running an app that shouldn't have permission to drop a table in a context of a user that does have permissions to drop the table.

    6. Re:True, but. by Anonymous Coward · · Score: 1

      They've always been buggy, but now we have a test case that triggers the bug.

    7. Re:True, but. by ranton · · Score: 1

      I disagree that you can view lack of security as a bug. Using your example, lets say a novel way to attack databases developed in 2018. Lets call it relationship mutations. Today we have no idea how it works and how to defend against it, because it isn't invented yet. Are all databases released today buggy as a result? Do they become buggy, without any code change whatsoever, at the time this new exploit is invented?

      I am not sure why you don't consider that a bug. If a new way of attacking any SQL command was discovered tomorrow, that would simply mean that 100% of existing SQL commands have a bug in them. It was a previously undiscovered bug, but a bug which needs to be fixed none the less. Perhaps the bug is in the SQL syntax or ODBC interface, but it is still a bug in need of fixing.

      --
      -- All that is necessary for the triumph of evil is that good men do nothing. -- Edmund Burke
    8. Re: True, but. by Anonymous Coward · · Score: 2, Insightful

      Theyâ(TM)re usually someone passing unescaped user data to an sql query. So the end user is able to break out of a string and change the functionality of the query. Incredibly basic stuff.

    9. Re:True, but. by magarity · · Score: 2

      Aren't SQL injection attacks usually queued commands? Isn't the ability to queue multiple SQL commands in one string a flaw in itself? Ex: what possible harm would it do to require a "drop table" command to be called on its own,etc ?

      The real flaw is giving out ddl grants to a service account that's supposed to be doing dml.

    10. Re:True, but. by ShanghaiBill · · Score: 1

      I am assuming Torvalds considers not building security into a system is a bug.

      By that measure, the code with the most bugs is the program that hasn't been written yet.

    11. Re:True, but. by next_ghost · · Score: 1

      Aren't SQL injection attacks usually queued commands? Isn't the ability to queue multiple SQL commands in one string a flaw in itself? Ex: what possible harm would it do to require a "drop table" command to be called on its own,etc ?

      You won't be able to execute non-trivial installation SQL scripts directly through your code. You'll either have to chop the script into individual queries and run each separately, or run the SQL script e.g. from command line.

      Also, SQL injection can be useful even without adding extra query. For example, if the login form uses this kind of SQL query: "SELECT * FROM users WHERE username='$username' AND password='$password_hash';", you can log in as arbitrary user without knowing the password just by typing this kind of username into the form: "username';--".

    12. Re:True, but. by Anonymous Coward · · Score: 0

      Software should not have any code at all to prevent a SQL injection attack.
      Software should simply not be vulnerable to an SQL injection attack, and correctly insert the data that looks like a SQL injection attack properly into the table.

      Lots of people from Scotland right now can not have their name in a database because it contains a quote. Either it causes an SQL injection, or there is code that checks for an SQL injection and then rejects the inputs. Both are less than ideal.

    13. Re:True, but. by ranton · · Score: 2

      I am assuming Torvalds considers not building security into a system is a bug.

      By that measure, the code with the most bugs is the program that hasn't been written yet.

      If the program hasn't been written yet, it cannot behave in any unintended way. So no, it doesn't have any bugs. A piece of software that when run allows a user to do something they aren't supposed to do is behaving in an unintended way, so that is a bug regardless of whether they put any thought into security when building it.

      --
      -- All that is necessary for the triumph of evil is that good men do nothing. -- Edmund Burke
    14. Re:True, but. by Narcocide · · Score: 2

      A bug is never just a mistake. It represents something bigger. An error of thinking that makes you who you are.

      -- Mr. Robot

    15. Re:True, but. by DarkOx · · Score: 1

      I am 'security guy' but I would agree with Linus most, maybe not all, but certainly most are just bugs.

      SQLi is a perfect example. The code does NOT work as intended. If SQLi is possible than code that was supposed to allow the input of a string somewhere does not handle certain strings properly, or does not correctly control the input domain if certain values are not supposed to be allowed! Take your pick.

        The first time that name filed for example encounters a name with an apostrophe in it, D'Arcy, or a title, Ivan "The terrible", with some double quotes the software breaks. In any case the code certainly did not intent to allow the query structure to be altered and it can be. Bug/Broken but the bug is in one of the following domains, insufficient input validation, improper string manipulation, incorrect missing escaping/encoding, incorrect API/library use pattern, etc. Its not security specific, but certainly has security consequences.

      What I would say to Linus is that there will always be bugs, some will have greater security consequences than others. Placing effort on controlling for bugs that have serious security consequences should take precedence over controlling for bugs in general, given limited resources.

      --
      Repeal the 17th Amendment TODAY! Also Please Read http://www.gnu.org/philosophy/right-to-read.html
    16. Re: True, but. by F.Ultra · · Score: 1

      That is not how you do it. You either properly escape the strings or you use prepared statements. In both cases you can have Scottish names with embedded quotes without any problem what so ever.

    17. Re:True, but. by Anonymous Coward · · Score: 0

      Aren't SQL injection attacks usually queued commands? Isn't the ability to queue multiple SQL commands in one string a flaw in itself? Ex: what possible harm would it do to require a "drop table" command to be called on its own,etc ?

      Oh god please stop talking... My head is about to explode. What possible harm would it do to require you think before clicking the "Submit" button?

    18. Re: True, but. by Anonymous Coward · · Score: 0

      You'd be surprised how many sites break if you enter your name as "<script"

    19. Re:True, but. by sinij · · Score: 2

      Security is adequately meeting requirements in the existing environment. You can't secure for all possible environment and use cases, especially future ones we can't yet anticipate.

      I don't consider my example of a hypothetical new exploit a bug because we can't be sure it is connected to a programmatic mistake. It could be the case that in the future all databases start running in a different environment... that is, our assumptions will have to be changed. This happened in the past - in the past databases were a single process run on mainframes that only were locally accessible. Today we typically have WAN-enabled distributed databases talking directly to the infrastructure (e.g. web) servers. Tomorrow the norm might shift again, where end-points directly interface with the cloud-based databases.

      My favorite DB exploit example is gold duping duping in Ultima Online circa 98-99. It had nothing to do with hacking or bugs in code. Players figured out how to time database backup, then performed a large set of transactions, then immediately jumped to a different spot in the world that was handled by a different DB node. This caused inaccessible character that reverted to an earlier state from backed up data, with some transactions lost (and multiple gold piles created). Is this a bug in DB software? I don't see it this way, at that time DB that could handle this type of use case simply did not exist.

    20. Re:True, but. by king+neckbeard · · Score: 1

      We can have a philosophical/semantics debate about how to classify a bug that was not known or prevalent before a certain time, but it's easier to accept reality and just stop assuming that bugs can only be created or closed by changes to the code.

      "Doesn't work on a smartphone browser" was a "bug" that popped up for many sites when smartphones became mainstream, despite the sites themselves remaining unchanged (in fact, that was the bug).

      By contrast, a bug that causes problems with a particular processor is "fixed" by the processor's end of life.

      --
      This is my signature. There are many like it, but this one is mine.
    21. Re: True, but. by DontBeAMoran · · Score: 1

      That's what I'm saying. Why does SQL allows to "break out of a string" in the first place?

      --
      #DeleteFacebook
    22. Re:True, but. by DontBeAMoran · · Score: 1

      Either you can't accept the fact that I do not know SQL very well, or you don't understand the core of my question.

      --
      #DeleteFacebook
    23. Re: True, but. by the_B0fh · · Score: 1

      You seem to have higher opinions of your Standard Developer[tm] than warranted.

    24. Re:True, but. by Anonymous Coward · · Score: 0

      "Security simply was not a consideration." is not just a bug any more than not providing a logon to a system is a bug. It's a conscious decision to avoid a well known feature.

    25. Re:True, but. by Anonymous Coward · · Score: 0

      I use queued commands normally to reduce latency.

    26. Re: True, but. by darkain · · Score: 3, Insightful

      Name some interpreted serialization formats that don't.

    27. Re:True, but. by WaffleMonster · · Score: 2

      The real flaw is giving out ddl grants to a service account that's supposed to be doing dml.

      Listening to this shit is painful. You should ALL know better.

      xkcd 327 is WRONG.

      Everyone who thinks SQLi is about cleaning / sanitizing / scrubbing / bathing data is fundamentally wrong and entirely missing the point of what SQLi actually is and how to address it.

      SQLi has NOTHING to do with the content of data. "Scrubbing" is entirely irrelevant. You all need to "internalize" this basic fact and stop propagating bullshit.

      As for the "real flaw" being handing out DDL grants this reminds me of xkcd 1200. What people actually give a crap about is what's in the box not the flimsy piece of cardboard holding the goods. More beyond worthless advice in a beyond worthless thread.

    28. Re:True, but. by Anonymous Coward · · Score: 0

      What LT is really attacking is all the specialized consulting that has built up around security. He's saying it's a bit fraudulent to try to carve out a niche for yourself as a security consultant when most of the time your hunting down server configuration errors or run of the mill software bugs. They don't have any special knowledge per se or special tools, but they charge extra for their work.

    29. Re:True, but. by magarity · · Score: 1

      I don't read that comic so your post makes little sense. I suppose in general I agree no one design any software around something they read in a web comic but I'm not clear on why it's painful to suggest an account that needs to only do dml not have ddl grants. Are you saying it should?
      Also, it's a little odd that you rant about how wrong the comic is yet have episode numbers memorized.

    30. Re:True, but. by Anonymous Coward · · Score: 0

      Code cannot behave in unintended ways if the intentions are not defined. The opposite of unintended is intended. All bugs are when the code does not do what is intentionally defined.

    31. Re: True, but. by raynet · · Score: 1

      Escaping SQL seems to be almost impossible task in this era of Unicode and gazillion encoding types, only safe way to go is prepared statements or something similar.

      --
      - Raynet --> .
    32. Re:True, but. by ichimunki · · Score: 1

      Most SQL libraries are serializing the text of the commands to send that to the server. Drop table is a perfectly valid part of a multiple command piece of SQL (especially if you might have a temp table as part of a sequence). The real security solution for SQL injection is two steps. First, sanitize user input before including it in SQL sent to the database. Second, set up correct permissions for what can be done via a connection that allows user-generated input to be included. The primary source of SQL injection vulnerabilities is the use of plain old string concatenation to form SQL commands and not sanitizing inputs, which allows the user to include malicious strings. Most SQL libraries have more sophisticated techniques for building commands that are much safer in the first place and don't require the programmer to be intimately familiar with how to safely sanitize inputs.

      --
      I do not have a signature
    33. Re:True, but. by ewibble · · Score: 1

      It is about both, I would say sanitation is more important. Yes there is no need to grant the process access to drop tables but that only patches that problem you can still do a lot of damage without that.

      e.g. '); update account set balance = 1000000;

      or even if you don't give write access (usually the process needs to write) it is still possible that you maybe able to extract information that you shouldn't have like other customers email, or credit card info.

      PS sanitation should not be done manually but build into the system.

    34. Re:True, but. by WaffleMonster · · Score: 1

      I don't read that comic so your post makes little sense. I suppose in general I

      It is not necessary as relevant context is provided separately. You can ignore the comic references if you'd like.

      agree no one design any software around something they read in a web comic but I'm not clear on why it's painful to suggest an account that needs to only do dml not have ddl grants. Are you saying it should?

      The original remark "The real flaw is giving out ddl grants to a service account that's supposed to be doing dml".

      The problem with this remark it treats a very specific instantiation of a symptom that does nothing to:

      1. Resolve the underlying issue
      2. Address problems caused by continued existence of underlying issue. In simplest of terms disallowing DDL prevents DROP TABLE ... but not DELETE FROM ... it does nothing to address the problem.

      Therefore this solution cannot live up to its billing "the real flaw is..."

      While irrelevant my personal opinion database level object based access controls are seldom useful. They are either to be written off entirely and punted to application tier or all access restricted to procedure calls and or views. Object level access simply isn't granular enough to apply the necessary constraints. It isn't that it isn't worth locking things like that are not necessary down it's simply insufficient in nontrivial systems as a measure to effectively protect systems from users.

      Also, it's a little odd that you rant about how wrong the comic is yet have episode numbers memorized.

      I generally think highly of xkcd. In this case while amusing it happens to be wrong. The same "wrong" is fairly widespread appearing in security literature and minds of many I have had to deal with on a daily basis over the years. It is in my view a dangerous misconception because it leads people to focus on judging the content of data when they should be judging the integrity of interfaces to ensure separation of context.

      Had to look up 327. 1200 remembered since it is a round number and the general theme comes up too often. What I see a lot of is people who work systems all day confusing what matters to them with what is important to the customer. Users don't give a rip about our system. They care about their data and how it affects their mission.

    35. Re:True, but. by p91paul · · Score: 1

      No it's not, an attacker is usually not interested in dropping your tables, but in reading them or modifying them to gain access to a system. The drop table example is just an EXAMPLE of something obviously harmful, not what is actually going to happen. Without considering the fact that a delete from x DML statement is just as dangerous as a drop table x DDL statement, so separating DML from DDL is not going to mitigate the issue.

    36. Re:True, but. by p91paul · · Score: 1

      As your parent said, the fact that nobody got something right does not make it not a bug. It just means everybody has a bug. The system was designed to use many db servers but could not guarantee transactional ACID properties when used in that configuration. The requirement was that ACID properties were respected(as part of the more general requirement that players should not be able to break the gold pile creation rules of the game). The system did not meet the requirements, hence it was buggy. Wasn't the bug in the db software but in a higher level that took care of coordinating the different db servers? It is still a bug.

    37. Re: True, but. by Anonymous Coward · · Score: 0

      I'll take PostgreSQL and Python client programming as an example. If I start with a unicode value (e.g. type 'unicode' in Python 2.7), my trivial and correct quoting routine needs to achieve the following:

      0. If needed, decode the user input into unicode if it came from some other external encoding, e.g. rawvalue.decode(encoding)
      1. Encode the unicode as a UTF-8 byte string, e.g. myvalue.encode('utf8')
      2. Find and replace the quote character with a doubled sequence of the quote character, e.g. myvalue.replace("'". "''") to add the SQL escaped quote.
      3. Reject resulting strings which have the NUL byte since PostgreSQL cannot handle this in text values, due to its legacy use of C string representations which are NUL-terminated. Other databases and applications may not need this?

      Obviously, something like this would be written into a small routine and reused, not written from scratch for each string input. What is needed is a code-style and review process to reject programs that don't invoke this tiny routine.

      Using SQL prepared statements doesn't actually change any of this. Someone performing raw commands on a SQL cursor cannot save themselves from quoting by generating "PREPARE ..." and "EXECUTE ..." strings, since the same SQL injection flaws can corrupt the EXECUTE statement if they naively insert values into it. I've seen people write code like this thinking the split PREPARE/EXECUTE voodoo actually protects them.

      It's really the use of a client-side templating API which saves you. As a client-side API, this code can specialize its behavior based on the native types passed in and implicitly invoke the right value quoting routines before interpolating the results into the SQL statement template. Doing this the old school way just requires the programmer to choose the right quoting routine for each input type they are handling.

    38. Re: True, but. by Anonymous Coward · · Score: 0

      Not. The bug is to not strictly check parameters against a concise regexp or similar.

    39. Re:True, but. by sinij · · Score: 1

      I am still not convinced.

      For example, my goddamn login page stops working when the singularity arrives. Is this a bug?

    40. Re: True, but. by Anonymous Coward · · Score: 0

      Wrong approach. Any external input should be strictly checked, as a general rule.

      The world of special characters and funny unicode stuff is much more than just SQL injections.

      HTML injections, shell escapes, php escapes - you name it.

      Developers better learn how to build strict input checkers or brace for catastrophic cyber events...

    41. Re:True, but. by magarity · · Score: 1

      OK, but notice I was replying to someone whose specific concern was dropping tables. I still think not granting ddl to the account in question solves that problem.

    42. Re:True, but. by magarity · · Score: 1

      I still think not granting ddl to the account in use solves the 'drop table' problem nicely which is what I was responding to in the first place. You seem to be side tracked into other problems.

    43. Re: True, but. by gnasher719 · · Score: 1

      That's what I'm saying. Why does SQL allows to "break out of a string" in the first place?

      Because SQL receives just a string containing valid SQL. SQL doesn't know that the string was created by some idiot concatenating parts of SQL commands and data coming from an untrusted user.

      On the other hand, if you think that sending database commands as plain strings is a bad idea from the start, you are not wrong there.

    44. Re: True, but. by gnasher719 · · Score: 1

      Escaping SQL seems to be almost impossible task in this era of Unicode and gazillion encoding types, only safe way to go is prepared statements or something similar

      JSON for example has no problems whatsoever putting any sequence of Unicode code points into a string, so I really can't say why SQL should have a problem with it.

    45. Re:True, but. by ranton · · Score: 1

      Code cannot behave in unintended ways if the intentions are not defined. The opposite of unintended is intended. All bugs are when the code does not do what is intentionally defined.

      Plenty of requirements are implicit. Very few requirements documents would list something like: "Don't delete all files on the computer when they click the Cancel button", but if some random cancel button ends up deleting all files on their computer it would be considered a bug.

      --
      -- All that is necessary for the triumph of evil is that good men do nothing. -- Edmund Burke
    46. Re:True, but. by Anonymous Coward · · Score: 0

      > Aren't SQL injection attacks usually queued commands?

      Only the most trivial ones, used as examples to introduce people to the concept. "usually" not

    47. Re: True, but. by Anonymous Coward · · Score: 0

      Sanely-processed SQL

    48. Re:True, but. by Anonymous Coward · · Score: 0

      Of course -- that is just a bug.

      What he's arguing about is an extra layer - say, whitlisting which sections of memory that can be copied from user- to kernel-mode so that if a process attempts to copy from a non-approved section of memory, that process is terminated - is simply going to get in the way and cause more bugs later on.

      Your kernel should still be secure without this extra layer - any security issues that exist without this white list mechanism are bugs. But this extra layer could add security -- or it could introduce a whole new set of bugs and make tracking down actual issues oh so much harder and generally obfuscate things.

      (e.g., something that scanned SQL statements looking for strings that have quote marks in them or other attempts to ensure it's sanitised from the user could easily end up getting in the way - confusing hard-coded queries with potentially unsafe user-based queries - or simply mis-parse things causing strange behaviour at run time. The proper fix is, of course, to use parameters.)

      Plus.. he's clearly had issues with arbitrary rules like this being forced down. As shown in the email thread; the fact the author had to introduce a 'fallback mode' late in the piece showed that it hadn't really been thought through entirely. After all, it's trivial to have a perfect firewall that blocks ALL malicious attacks (a concrete block with two bits of Ethernet cable will do it!). The trick is a firewall that blocks all attacks but keeps the system usable.

    49. Re:True, but. by Anonymous Coward · · Score: 0

      Therefore all ML approaches are buggy,

    50. Re: True, but. by Anonymous Coward · · Score: 0

      He doesn't really have to, does he?
      As you pointed out it is pretty clear the design flaw is that an interpreted serialization format is used for database queries.
      Fix that and SQL injections disappear.

      Overall realtime interpreted languages appears to be a bit of a problem. It seems far too tempting to add and use eval-like functions to it which allows for code-injection through channels that otherwise only accept plaintext.

    51. Re:True, but. by LostMyBeaver · · Score: 1

      I'm not really an SQL Injection expert, but as a developer, I use SQL a lot and while I'm quite good as a developer, I'm absolutely awful as a database administrator.

      I think that's the point which I'm about to make. Consider for example nearly every modern SQL binding you come across.

      Python has no standardized method of accessing databases. Each database has it's own connector and their front end bindings for a database connection is written in pencil. Then within the code, there's raw SQL splattered left and right and while it looks super easy to use, it's a frigging security nightmare like you've never seen.

      Node.js seems to be about the same.

      Java is a lot cleaner in the sense that there is the JDBC binding which is very powerful and standardized and tools that allow for fluent programming can be very powerful. The advantage of fluent database programming is that you never pass SQL directly to the engine. So if you try to do SQL injection via a fluent API, it won't work. .NET include Entity Framework which is a fluent programming model for databases on top of ODBC or OLEDB. It's lovely and offers far more opportunity than Node or Python for database security.

      There are disadvantages of fluent programming for databases, but the advantages far outweigh the disadvantages overall.

      Now back to the original point, let's ignore the programming pleasantries and focus instead on the DB administrator aspects.

      When I get a connection string as a developer from the DBA, I expect a developer connection string as well as a production connection string. I would expect that the production string would have permissions blocking destructive commands almost firewall-style and would hope that a good dba would require me to exploit views, indices and stored procedures correctly.

      On the other hand, I've never worked in a development company with educated database administrators. All I've ever encountered is a developer who knows how to hack together basic DB security for the developer.

      Come to think of it, I spent many hours last week trying to find a reasonable reference on configuring MongoDB, MariaDB, MySQL, Postgres, etc... for replication and distributed processing. That went poorly.

    52. Re: True, but. by Anonymous Coward · · Score: 0

      Because otherwise you'd have to do multiple actions in multiple roundtrips.

      The problem isn't allowing multiple statements to be run - it really isn't, and the fact that you think it is makes me think you're the sort of person that would "fix" SQL injection by blacklisting keywords user input.

      The bug is allowing user input to be interpreted as language syntax instead of parameters.
      If that real bug isn't fixed, then there are still plenty of SQL injection vectors that don't require execution of multiple statements.

      Fortunately, fixing that bug is a solved problem (in all languages except PHP). Never build queries by concatenating user input.
      Never.

        You have to literally have no idea what you're doing to introduce SQL injection in 2017. (Or 1998 even).

    53. Re: True, but. by F.Ultra · · Score: 1

      No, no, no, you don't go around inventing your own half assed escape function.

      If you use PostgreSQL you escape the strings with the PQescapeStringConn() function from libpq which should be available from Python. With MySQL/MariaDB you use mysql_real_escape_string() from libmysqlclient/libmaria.

      And if you use MSSQL you... Hmm, afaik you actually have to implement your own half-assed escape function there. I don't know if they have any at all (perhaps they have one in their new c# connector, but they don't appear to have any in the OLEDB connector).

    54. Re: True, but. by F.Ultra · · Score: 1

      Unicode is a non-issue since the built-in quote function in libpq/libmysqlclient handles the encoding just fine. The only thing that matters is which encoding is used for the client-to-server connection since that is what determines which characters that are dangerous so there are not gazillion encoding types to think about, simply set the connection to be utf-8 and you have a single encoding to worry about (but of course the built in quote functions cater for the actual encoding used so it doesn't really matter anyway).

    55. Re: True, but. by F.Ultra · · Score: 1

      I think the problem occurs for people who work with MSSQL since there exists no escape function for MSSQL like there does for PostgreSQL and MySQL/MariaDB so every dev there have to create their own buggy version.

    56. Re:True, but. by Anonymous Coward · · Score: 0

      You are absolutely 100% correct.

      Preventing the user from inputing a certain type of data because your system can't handle it (rather than because it is literally invalid for the domain of the data) is the worst kind of laziness.
      Lossily modifying user data because your system can't handle it is worse than laziness, because it's more work than just making your system handle it.

      In the case of SQLi, the solution is simple - don't concatenate user input to the query. That means either: a) use bind variables, or if your environment is so awful that it doesn't have a bind variable mechanism then b) Write yourself a query API wrapper that _does_ use bind variables (and uses a proper encoding function provided by the database to do the inevitable escaping required).

      The actual business logic code should never, ever simply concatenate user input . Never. It should also not be responsible for "sanitising" the input, because you _will_ forget. The data layer API you use (whether it be direct use of something like JDBC, or your own in-house data API) should handle that in one single, centralised place with plenty of test cases, so that if it does happen to have a flaw, it can be fixed once.

    57. Re:True, but. by Anonymous Coward · · Score: 0

      Not "Sanitation". Sanitation shouldn't be done as a security measure. It may be done as a data-integrity measure if it matters for the particular data domain, but for security you want encoding, not sanitation.

      (Sanitation implies permanently removing information from the user's input - and it is very possible for data that is perfectly valid for a business domain to be potentially bad for technical reasons - you never throw away valid business data, so encoding is the process to use, not sanitation).

    58. Re:True, but. by DontBeAMoran · · Score: 1

      e.g. '); update account set balance = 1000000;

      There's the problem right there. Why is SQL accepting two commands in one line?

      Wouldn't dropping everything after ";" fix all SQL injection attacks?

      --
      #DeleteFacebook
    59. Re:True, but. by WaffleMonster · · Score: 1

      I still think not granting ddl to the account in use solves the 'drop table' problem nicely which is what I was responding to in the first place. You seem to be side tracked into other problems.

      If the problem is we need to keep people from deleteing all of our data.

      The answer disallowing DROP TABLE does not solve this problem.

      It does not prevent the execution of DELETE FROM. Simple as that.

      Saying that DROP TABLE is solved by disallowing drop table is a trivial word game with no practical real world value.

    60. Re: True, but. by raynet · · Score: 1

      Unfortunately JSON libraries have had encapsulation bugs. Safest encoding I know for SQL is one that I have to use with MSSQL, that is to take the input string and convert it into a hexdecimal string which then can be inserted safely to the database.

      --
      - Raynet --> .
    61. Re: True, but. by raynet · · Score: 1

      If you set the connection type to utf-8, which normalization is used? And there have been quote bugs on Mysql, thus there might be one in the future.

      --
      - Raynet --> .
    62. Re:True, but. by Anonymous Coward · · Score: 0

      It's true, security problems usually exploit a bug. BUT, in general, there is a systematic problem underneath the bug, which allows a bug in a program to escalate to gain access to root-level systems. So, it's not just a bug, but a bug that is built on a system that does not have security built in.

      A developer's priority is to get his algorithm working. It is subjected to (automated) testing, and to walkthroughs. In most cases, the testing array is not more than three dimensions Arrive from dimension 1, choose an attack from dimension 2 and see if you can get in via the rules in dimension 3. Can a human do more than 3 dimensions?

      I am guessing that a hacker has some kind of "Break the code" tool. That code is what the security analyst should have. I suspect that the code works from the inside out. I am at what gives access, what are the paths/conditions that got me here. Now go up one level for all the enabling paths/conditions and do that again, recursively. In other words, work from the inside out.

    63. Re:True, but. by cas2000 · · Score: 1

      e.g. '); update account set balance = 1000000;

      There's the problem right there. Why is SQL accepting two commands in one line?

      the problem is not that SQL accepts two commands in one line. To start with, there's nothing magical about a newline or other EOL marker that makes it ANY different to a semicolon or any other statement separator. Secondly, it's not a security problem in SQL any more than it is in ANY of the other programming languages that allow statements to be separated by a semicolon or EOL or other character (i.e. **ALL** of them, every single scripting/programming language in existence - bash, for example).

      The problem highlighted by that xkcd cartoon is not that semi-colons are bad, but that trusting user-supplied data is fucking stupid. Validate your input, sanitise it, clean it up before making any use of it - but do not ever trust it.

      In the specific case of SQL, use your SQL library's implementation of prepared statements and placeholder values(*) as a final defence to catch stuff you might have missed, rather than thinking you can get away with just quoting the input data and embedding it in a string to be executed. e.g. in perl DBI, as well as validating and sanitising user-supplied data, you'd use something like:

      (*) if your preferred SQL library can't do something analogous to this then it is worthless garbage and you need to replace it immediately with something that can.

      # use ? placeholders
      $sql = 'update account set balance = ? where name = ?';
      $sth = $dbh->prepare($sql);
      $sth->exec($newbalance, $name);

      rather than:

      # directly embed (possibly user-supplied) data into sql command strings.
      $dbh->exec("update account set balance = $newbalance where name = '$name'");

      With the former, there is no chance that user-supplied data can be executed as an SQL command string (this is not the same as saying it is perfectly safe - the SQL lib or backend database may have other bugs that can be exploited) but it does eliminate a huge category of relatively easy exploits (i.e. exploits caused by idiot devs who don't even make the simplest effort to program defensively). It's also easier and less work - with a little bit of setup, you don't have to fuck around with quoting, which is easy to get wrong and tends to make it difficult to avoid writing unreadable and unmaintainable code.

      With the latter example, if either of those two variables ($newbalance and $name) contain un-validated, un-sanitised user data then the sql command can be trivially abused to execute arbitrary sql code, just by adding a semi-colon followed by arbitrary sql code and then another semi-colon (so that your bad sql code isn't invalid syntax due to whatever comes after it in the original sql string) to the end of one of the input variables - optionally preceded by a starting end-quote if the data is a string type.

      BTW, many SQL exploits unavoidably cause one or more commands to be invalid and thus generate an error - so wrapping all commands inside a transaction is a useful tactic for defeating many other potential problems - one of the reasons for/benefits of using a transaction is that ALL commands within the transaction must succeed or they are all automatically rolled back.

      Wouldn't dropping everything after ";" fix all SQL injection attacks?

      congratulations. you're taking the very first steps towards reinventing sanitising data input.

    64. Re:True, but. by cas2000 · · Score: 1

      two things occurred to me after posting:

      1. when i wrote "worthless garbage", I grossly understated it. "worse-than-worthless garbage" is better but still completely inadequate to describe just how shitty such a library would have to be to fail to include such essential basic functionality.

      2. I should have pointed out that the basic error in the second example is that because it is directly embedded the user-supplied data into the generated SQL command string, it is causing that data to become code. code is executable. data is not (or shouldn't be).

    65. Re:True, but. by cas2000 · · Score: 1

      I agree with everything you say except The actual business logic code [...] should also not be responsible for "sanitising" the input .

      It is never wrong to have multiple layers of defence, even if they're mostly or entirely redundant. This is especially true if you can't, or can't easily/quickly, fix the library or the backend server to deal with a newly discovered problem.

    66. Re:True, but. by cas2000 · · Score: 1

      damn. clicked Submit too soon again.

      That should read "I agree with everything you say about bind variables".

      quite obviously, I disagree with what you say about validating and sanitising input being a bad idea. It's not. It's just another layer in the defence strategy.

    67. Re: True, but. by F.Ultra · · Score: 1

      It depends on which collate you use for either the column, the table and/or the connection but if you use the utf8_unicode_ci then it follows the normalization rules as set out by the Unicode consortium. Yes there might be bugs in software, this does not make it "almost impossible". If "there might be a bug in the software" would be a show stopper then we would as of yet not even have booted up the very first computer.

  3. Security problems are NOT just bugs by sinij · · Score: 1, Insightful

    He is demonstrably wrong. True, some security problems are bugs, but there are also security problems that are bad design choices, that are misconfigurations, that are counting use of old technology (e.g. RSA 1024), that are poor use cases (nobody follows policy, because it is too complex and/or convoluted). You can't secure systems with just code reviews and patching. No way, no how.

    1. Re:Security problems are NOT just bugs by Dog-Cow · · Score: 5, Informative

      Linus's context is entirely in terms of the kernel. If you ignore that, you write comments that are complete non-sequiturs.

    2. Re:Security problems are NOT just bugs by burhop · · Score: 1

      he said they were "primarily" bugs. By "problem", I would guess he is talking about issues in properly set up software.

      You are right about there being other issues in practice but you might argue better without using a strawman.

    3. Re:Security problems are NOT just bugs by Anonymous Coward · · Score: 1

      He is demonstrably wrong. True, some security problems are bugs, but there are also security problems that are bad design choices, that are misconfigurations, that are counting use of old technology (e.g. RSA 1024), that are poor use cases (nobody follows policy, because it is too complex and/or convoluted). You can't secure systems with just code reviews and patching. No way, no how.

      Considering that he is a kernel maintainer and that his was responding to a guy trying to push code into the kernel, it is pretty clear that he was talking about kernel code. So he is demonstrably right, if you understand that he is talking about the kernel code.

    4. Re:Security problems are NOT just bugs by Anonymous Coward · · Score: 0

      Those are also bugs - in the data processing system. Not just the code, but the system used for acquiring and using data. That includes all that other stuff - bad design choices are definitely bugs; misconfiguration should be difficult or impossible; using old or inappropriate technology (not the same thing, btw) is definitely a bug; etc. Bugs are not limited to errors in the code.

    5. Re:Security problems are NOT just bugs by ranton · · Score: 4, Informative

      He is demonstrably wrong. True, some security problems are bugs, but there are also security problems that are bad design choices, that are misconfigurations, that are counting use of old technology (e.g. RSA 1024), that are poor use cases (nobody follows policy, because it is too complex and/or convoluted). You can't secure systems with just code reviews and patching. No way, no how.

      A software bug is an error, flaw, failure or fault in a computer program or system that causes it to produce an incorrect or unexpected result, or to behave in unintended ways. You may disagree with this definition of a software bug from Wikipedia, but I think it lines up with what I consider a bug. The bad design choices you mention are merely another potential cause of a bug.

      The context of Linus's statements must also be considered. He is talking about product level security (Linux kernal in this case), not enterprise scale system level security. At my company some security concerns are at the product level, such as ensuring users can only see the appropriate fields / records. Others are at the operations level, such as properly verifying the identity of a customer over the phone before relieving certain information. I agree with Linus that security problems at the product level are primarily just bugs. Security problems at the level of corporate policies are sometimes bugs, but also sometimes the result of people not following protocol. All the training in the world will never prevent employees from making mistakes, and sometimes it isn't possible to put checks and balances everywhere.

      --
      -- All that is necessary for the triumph of evil is that good men do nothing. -- Edmund Burke
    6. Re:Security problems are NOT just bugs by Nutria · · Score: 0

      Bad design choices

      Like choosing to use insecure-by-design languages.

      The vast majority of security bugs would disappear if languages like Ada, PL/1, FORTRAN and COBOL were used instead.

      --
      "I don't know, therefore Aliens" Wafflebox1
    7. Re:Security problems are NOT just bugs by mean+pun · · Score: 1

      He is demonstrably wrong. True, some security problems are bugs, but there are also security problems that are bad design choices, that are misconfigurations, that are counting use of old technology (e.g. RSA 1024), that are poor use cases (nobody follows policy, because it is too complex and/or convoluted). You can't secure systems with just code reviews and patching. No way, no how.

      You are completely missing Linus' point. He is saying in the context of kernel development that security issues don't get privileged treatment. There is one set of rules for all issues, be they outright bugs, bad design choices in any aspect, misconfiguration in any aspect, etc.

    8. Re:Security problems are NOT just bugs by NicknameUnavailable · · Score: 1

      Bad development choices and programs which are able to be misconfigured are bugs. Examples of this are choices not to use https for a login page - it's a bug in the implementation, or a config file which allows you to forgo a certification+keypair - which implies the underlying program lacks the means to prevent you from running it with that setting in place or is too lazy to generate some on the fly as needed. All security holes are bugs, they mostly revolve around imparting some degree of trust to the end user (or administrator,) but as any security professional knows you never trust a user, even if they have admin rights.

    9. Re:Security problems are NOT just bugs by hey! · · Score: 5, Interesting

      A few years ago I spent some time studying ontology technologies. In a nutshell ontology is a branch of philosophy having to do with "being" and existence, but in an information technology context it refers to models of reality that are built around taxonomic models (e.g. statements like "security problems" are a kind of "software bug"). This has most obvious applications in object oriented class hierarchies, but taxonomic models are also a big part of database design and also implicitly arise in the design of data interchange formats.

      Here's what I took away from my dive into the intersection of metaphysics and software engineering: taxonomic models are only valid within a specific domain of application. Even if you intend to model objective reality, you end up modeling just the parts you work with.

      This is a perfect example. Torvalds is effectively saying while some security problems may not be bugs, but for practical purposes nearly all of them are. Clearly this is true for him, so true that he literally doesn't know how to work with people concerned with non-bug security problems. What he is saying has really more to do with what he does on a day to day basis, rather than about the overall field of security. In that field you also have to deal with issues like trust delegation, agency, physical security and and social engineering. Clearly Torvalds must know these things exist, but for him they might as well not.

      People are very seldom concerned with some kind of universal model of capital T Truth; they're almost always concerned with creating models that help them get their job done. This is inevitable, and it creates problems when you try to glue data from different sources together. The unnecessary problems that arise come from people who don't accept that their useful domain-specific models don't describe all of objective reality.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    10. Re:Security problems are NOT just bugs by Anonymous Coward · · Score: 0

      The use of the word "demonstrably" doesn't make your argument stronger -- it makes you sound obnoxious.

    11. Re:Security problems are NOT just bugs by swillden · · Score: 1

      Linus's context is entirely in terms of the kernel. If you ignore that, you write comments that are complete non-sequiturs.

      More importantly, Linus's context is the particular discussion. If you lift the comment to the context of the kernel as a whole, it's wrong.

      In the full context, I think he has a point; he was arguing against panicking the kernel when an out-of-spec situation is found. The security guy's (Kees) patch presumed that out-of-spec indicated an attack, when it most likely just indicates a bug. Being a security guy myself, I sympathize with Kees, we tend to think about things in terms of how to mitigate possible attacks, and reducing pwnage to DoS is a good thing. Not so much, though, if the panic gets triggered a lot by ordinary bugs. In that case, we need to detect the problems, but continuing to run is good.

      But, if we take the statement as an absolute, even in the kernel context, it's wrong. There are lots of security problems which aren't "just bugs", they're fundamental design and architectural flaws. And Linux has a really bad one: it's monolithic. A bug in any driver can compromise the entire OS, giving the attacker access to the entire system. The "hardening as debugging" which Kees is doing is a rearguard action which could reasonably be described as hopeless. Oh, it's well worth doing, but it will never really solve the problems. We've been trying for years to staunch the flow of critical security vulnerabilities in the kernel, and there's no evidence that it's getting better.

      At some point, we need to get away from monolithic kernels and move to micro-kernel models with strong mandatory access control firewalls between all of the components. It's clearly not possible to retrofit that approach onto Linux, though.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    12. Re:Security problems are NOT just bugs by Anonymous Coward · · Score: 0

      This is a very charitable interpretation of Linus. Perhaps over-charitable.

      Personally, I'm inclined to believe that not knowing how to work with people who don't live in the same "working reality" as you is a personal bug. You don't have to use the same models as someone else to acknowledge that their models work for them, just as yours work for yours. Calling people "fucking morons" is not acceptable behavior for an authority figure, especially when they may live in a different "working reality" than he does and have reasons for treating the world the way they do.

    13. Re:Security problems are NOT just bugs by hey! · · Score: 3, Insightful

      Well, I certainly wouldn't want to endorse Torvalds' attitude here. But you encounter it, minus the armor of overwhelming fame, all the time when you work with multiple groups of stakeholders. As a system designer a lot of what you do when you develop system requirements is make localized concerns globally visible. But there are always people who don't see the needs of other users as important, and depending on how they're situated they can create a lot of grief.

      People actually confuse "objective" and "subjective". I actually had a client once who even used those terms: we should focus on what's "objectively" important, by which he meant things that seemed obviously important to him. Things that were important to other stakeholders were "subjective" concerns. People do that a lot more than they realize, even if they don't use those terms. What's rare is having enough status to be an asshole about it.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    14. Re:Security problems are NOT just bugs by Anonymous Coward · · Score: 0

      This has nothing to do with the main topic here, but you might enjoy an observation I heard years ago, which stuck with me and haunted me.

      Web ontologies are really just poorly named and poorly executed epistemologies. The fact that the practitioners don't admit that they are only studying belief and knowledge does not elevate their efforts to an objective realm.

    15. Re:Security problems are NOT just bugs by hey! · · Score: 1

      The practical problem is that people don't understand the undesirable effect of propagating constraining logic between application domains.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    16. Re:Security problems are NOT just bugs by JDShewey · · Score: 1

      That means that this article, as it is written on /. is a non-sequitur as it never establishes that context. Perhaps it should have read "... KRENEL security problems are primarily 'just bugs.'?

    17. Re:Security problems are NOT just bugs by sinij · · Score: 1

      Very interesting and new to me idea.

    18. Re:Security problems are NOT just bugs by Anonymous Coward · · Score: 0

      People who propagate constraining logic between application domains are !@#$ing morons.

    19. Re:Security problems are NOT just bugs by sinij · · Score: 1

      I used it intentionally. With minimum effort I can dig up CVEs that are not arguably a bug. For example, CVE-2005-4351 is a design flaw. It happens even in Linux kernel.

    20. Re:Security problems are NOT just bugs by Anonymous Coward · · Score: 0

      At work we love it when someone from outside the company uses the word "ontology" in a non-sarcastic way. It lets us know immediately that we'll get a lot more work done if we just start ignoring them now.

    21. Re:Security problems are NOT just bugs by ctilsie242 · · Score: 1

      One solves security issues by architecture primarily. This ensures that the damage a bug can do is minimized. I do wish mainstream operating systems went with a microkernel, or a more structured, compartmentalized system. It might make writing drivers tougher, but it would keep something like a USB flesh drive from masquerading as a keyboard and mouse, when it shouldn't.

      The Linux kernel has been pretty good when it comes to security, but what threats are out there might just trying to patch bugs without a major redesign of the kernel's architecture similar to trying to patch a leaking dam with duct tape and JB Weld epoxy putty sticks. Even Microsoft had to re-architect Windows from XP to Vista due to this.

      Things like SELinux and AppArmor do help, but it might be that structuring kernel space, and moving to a microkernel based architecture may be inevitable.

    22. Re:Security problems are NOT just bugs by Anonymous Coward · · Score: 0

      All design decisions are intentional. Bugs are by definition unintentional defects. You may try to argue that design decisions are not intentional, but then you have to concede that you are saying some design decisions are arbitrary. Who the f*ck makes arbitrary design decisions?!

      Anyway, if you read any books on architecture, design, or security, they all say that you cannot test for architectural or design flaws because by definition, you tests are working to spec and should not fail if they follow the architecture and design. I've seen the term "correctness" used time and time again. It is not something that can be tested, it is a meta-property of the architecture and design that can only be understood by reasoning.

    23. Re:Security problems are NOT just bugs by Anonymous Coward · · Score: 0

      Bad development choices and programs which are able to be misconfigured are bugs.

      Flaws, but not bugs. If it's working to spec, then it's not a bug. If there is a flaw in the spec, you change the spec, but that is called a "feature change". A "bug" caused by the result of a poor spec is technically called a "feature". This also applies to "incomplete" specs that have gaps in their definitions. If a case is not defined, then arbitrary handling of that case is to be expected, and the arbitrary implementation is a feature.

    24. Re:Security problems are NOT just bugs by hey! · · Score: 1

      My conclusion from my study is that using ontology technology for inter-organizational standards was a really bad idea because it exported baggage from each organization that creates problems for the other organizations. On the other hand the technology had potential uses internally (e.g. purging sensitive information from datasets being shared).

      Basically RDF is really potentially useful in a lot of situations where people use XML, but OWL is asking for trouble.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    25. Re:Security problems are NOT just bugs by quintus_horatius · · Score: 1

      Bad design choices

      Like choosing to use insecure-by-design languages.

      The vast majority of security bugs would disappear if languages like Ada, PL/1, FORTRAN and COBOL were used instead.

      Very few public, large-scale projects are coded using the older 'safe' languages. (Ignoring Rust for the moment, which is safe, but it's also new and is gaining wider distribution through Firefox). That might be a clue that there's an inherent problem with many safe languages -- whether it be performance, difficulty in actually getting useful things done, or something else.

    26. Re:Security problems are NOT just bugs by hey! · · Score: 1

      Intentionally. However it's very easy to do that unintentionally.

      For example, suppose your state bars felons from various things like owning a gun and voting. It exchanges lists of convicted felons with another state, however the states don't agree on whether specific crimes are felonies or misdemeanors. Depending on how you ask for the data, you can end up with different results.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    27. Re:Security problems are NOT just bugs by Nutria · · Score: 1

      Nah, it's Comp Sci snobbery.

      --
      "I don't know, therefore Aliens" Wafflebox1
    28. Re:Security problems are NOT just bugs by ranton · · Score: 1

      All design decisions are intentional. Bugs are by definition unintentional defects.

      All design decisions are intentional, but design decisions nearly always have unintentional effects. Bugs are often caused by those unintentional effects.

      Anyway, if you read any books on architecture, design, or security, they all say that you cannot test for architectural or design flaws because by definition, you tests are working to spec and should not fail if they follow the architecture and design.

      Do you have an example of such a book? Our testing team routinely catches architectural or design flaws when their tests identify edge cases which were not considered during architectural or design reviews. It is certainly much harder to catch these defects but it certainly common to do so.

      --
      -- All that is necessary for the triumph of evil is that good men do nothing. -- Edmund Burke
    29. Re:Security problems are NOT just bugs by Anonymous Coward · · Score: 0

      People are very seldom concerned with some kind of universal model of capital T Truth; they're almost always concerned with creating models that help them get their job done. This is inevitable, and it creates problems when you try to glue data from different sources together. The unnecessary problems that arise come from people who don't accept that their useful domain-specific models don't describe all of objective reality.

      That sounds like a scenario where consulting architect work with old-school consulting engineers with some previous government experience. Any problems in that scenario usually relate to personality conflicts or communication and social skills, rather than anything that can be dealt with analytically in the technical realm of the project. Big design houses and contractors solve these issues with brute force and threats of termination, rather than tolerating diversity and care enough to make it work, even if it would be of the best interest of the customer. The problem is universal.
        "Be excellent to each other" just doesn't cut through the fog of ego sometimes.

    30. Re:Security problems are NOT just bugs by Kjella · · Score: 1

      Here's what I took away from my dive into the intersection of metaphysics and software engineering: taxonomic models are only valid within a specific domain of application. Even if you intend to model objective reality, you end up modeling just the parts you work with.

      Usually because you collapse the model in all the directions that don't really matter to you. Like say if you're classifying animals, you like mammals and reptilians and that way... but then you got aquatic creatures like fish and whales, land-based like lizards and humans, flying animals like bats and birds. You got predators and herbivores, nocturnal animals and day-dwellers, bipeds and hexapods and any number of other abstractions which might be useful in a particular context. And you always end up with penguins that can't actually fly(). I've grown more and more in favor of the "object as a collection of interfaces" thought than belonging in some kind of family tree.

      --
      Live today, because you never know what tomorrow brings
    31. Re:Security problems are NOT just bugs by phantomfive · · Score: 1

      Fascinating comment, thanks.

      --
      "First they came for the slanderers and i said nothing."
    32. Re:Security problems are NOT just bugs by Anonymous Coward · · Score: 0

      By definition, if you test system finds "flaws" in the architecture or design, then your test does not follow the spec and is therefore wrong. I have recently read several of the classic software engineering books that say the same, but the only name coming to mind because of the most recent, is Bruce Schneier et al in Cryptographic Engineering when they were talking about bugs and correctness of code. Like I said, he's not the only one. I've seen this same logic many times and was my own logic about the topic before I started reading. I'm just glad I think the same way as the "gods" do.

    33. Re:Security problems are NOT just bugs by hey! · · Score: 1

      Usually because you collapse the model in all the directions that don't really matter to you.

      You can think of this this way in principle, and that's important because otherwise when you move data from one domain to another you'd never be able to reconcile the different viewpoints under which data is constructed. But it doesn't take too much of that for the complexity to overwhelm your ability to get anything useful done, so even if it were possible to deal with all the issues like differences in opinion and limitations of human knowledge, you still can't hope to capture any kind of complex reality fully in a model.

      The design implication is that when you are developing data interchange mechanisms (which was the focus of my study at that time) you need to aim for sufficient implication to be transferred between systems, but no more.

      I've grown more and more in favor of the "object as a collection of interfaces" thought than belonging in some kind of family tree.

      Thinking in terms of interfaces is an example of the kind of minimalism I'm talking about. Declaring that an object (or class) supports an interface ensures that it behaves properly in some context, and nothing more. This is what makes C++ multiple inheritance messy (or did, they may have fixed that in the twenty-five years since I've used C++).

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    34. Re:Security problems are NOT just bugs by Dog-Cow · · Score: 1

      I don't think you understand the difference between a monolithic and a micro kernel. The latter in no way prevents a driver or device from masquerading as something it is not. The very idea doesn't even make sense.

    35. Re:Security problems are NOT just bugs by Dog-Cow · · Score: 1

      Linus's point is that a bug which leads to a security issue is still just a bug. It doesn't matter whether you are looking at the kernel as a whole, or just the parts that this patch series is trying to change. Linus also did not write that all security issues are bugs, only most.

      And once you go off into microkernel land, we know you're a nut.

    36. Re:Security problems are NOT just bugs by Dog-Cow · · Score: 1

      If you are commenting on Linus's writing based on a slashdot summary, you're already a hopelessly naive idiot, and there's no point bothering with you. There's a link to the damn email right there.

    37. Re:Security problems are NOT just bugs by Anonymous Coward · · Score: 0

      He is demonstrably wrong.

      Except that he isn't wrong, at all. He isn't talking about security problems in general. He is talking about security problems in the kernel. Nothing else.

      While the other stuff you write is true for security in general, that is not what Linus is talking about, nor what he is working with or responsible for.

      In short, he is right, some of what you wrote is true, but your statement that he is demonstrably wrong is, indeed, demonstrably wrong.

    38. Re:Security problems are NOT just bugs by JDShewey · · Score: 1

      The reason I read aggregated news (and /.) is so that I don't have to read the original source for literally everything. If I was going to bother to read the entirety of every single original source, I wouldn't on on /. in the first place, so I'm having a had time figuring out why you are here bothering with calling me a hopelessly naive idiot (unless you too are a "hopelessly naive idiot" who reads /. summaries yourself...)

    39. Re:Security problems are NOT just bugs by Anonymous Coward · · Score: 0

      You're absolutely right. Also, in my twenty-or-so years of experience in software development I've learned that most bugs are not just bugs in the sense that they're not caused by a typo or a temporary brainfart. Almost all bugs, or at least those that actually survive to source control, are symptoms of deeper systemic problems. I cannot begin to compile a list of the things I've seen but to give you an idea of what I'm talking about, I'll discuss a few examples.
      I've seen a security critical project where security wasn't thought about at all during the design phase because not enough time and budget where allotted to this aspect by management. In the end security had to be kind of patched on and this caused lots of bugs. Linus would argue that these are just bugs and that the programmers should have been aware of the convoluted interactions between different parts and just not have messed up, but in the version 2 redesign we designed security into the system in the planning phase and this helped enormously. So these bugs weren't just bugs.
      In another project, the lead developer was autistic. I don't know how he ever got promoted to that role, as he was manifestly unfit for his job, but he was the lead and nothing could be done. There were huge communication issues leading to different teams having different ideas of how the final integrated product was supposed to work. In addition, he was completely and utterly unable to imagine how a consumer of an API might expect to use it and inversely he managed to misinterpret API documentation and design documents in the weirdest ways. In addition, he always had fixed ways in which he insisted things needed to be done which were divorced from reality and he was socially abrasive, so about two weeks into the project parts of teams working together started to cut him out of the loop. Which in itself was not so bad, but that meant that other teams whose only connection went via him were also cut out of the loop. Integration was hell, bug density was higher than in the average termite mound and I'm strongly of the opinion that no sane person would call these just bugs.
      Another project was a web application. A number of new hires hadn't had any security training and were in addition not sufficiently paranoid. Senior management insisted they had all the diplomas they needed, that they'd do at least an adequate job and that we shouldn't worry about integration. But when their modules got submitted, they were full of really humdrum bugs, like unchecked buffers, not being careful about handling user-supplied parameters, and so on. We even found an SQL-injection bug, even though the framework we were using strongly encouraged named parameters. It quickly became apparent that integration would take a lot longer and after a long discussion with management and the developers in question, it became apparent that the biggest problem was that they when programming didn't even start to think thoughts along the lines of ‘what if the user were to supply a different value’. Those bugs weren't just bugs either, they were caused by attitude, lack of experience and lack of education.
      I could go on and on and on, but this has become an enormous wall of text already and I think I've made my point.
      Most bugs are not just bugs.

    40. Re:Security problems are NOT just bugs by gunslnger · · Score: 1

      He's still stupidly wrong. There are also design flaws, or architectural errors. Those are not bugs.

    41. Re:Security problems are NOT just bugs by gunslnger · · Score: 1

      You can run linux on a secure kernel though, then it doesn't matter if linux is insecure.

  4. What is it then? by Anonymous Coward · · Score: 0

    If they're not a bug it implies they're intentional.

    I can't think of many developers who intentionally build in security problems.

    1. Re:What is it then? by TexasDiaz · · Score: 1

      True, but I can think of many developers who build in security problems due to ineptitude. Ignorance is not an excuse.

    2. Re:What is it then? by NicknameUnavailable · · Score: 1

      True, but I can think of many developers who build in security problems due to ineptitude. Ignorance is not an excuse.

      Ineptitude is a bug. The resolution just involves a hammer to the face instead of an IDE.

    3. Re:What is it then? by Anonymous Coward · · Score: 0

      Any sufficiently advanced incompetence is indistinguishable from malice.

      One must assume they are either incompetent or malicious. Any individual act of incompetence is not an issue, but how often they occur. I've created a project with tens of thousands of lines of highly optimized threaded code to find out that 3 of the 5 bugs in the project where from a heavily used point-release of an LTS library that had no know bugs for over a year.

      The only reason I discovered the 3rd-party bugs was because I have well-defined code that should work because it is correct. When an issue arose, I was able to confidently say "I just created this project, it has no unit tests, it has not had any peer review, it has not had any QA, but I am absolutely confident that this bug is in this library that millions of people have used for a year without issue". I was able to do this without debugging and only by thinking about the problem, and in only a few minute's time.

      In general, I debug my code without looking at the code and without a debugger. And I don't mean during the slap-together phase of programming. I mean the "I have not had to touch this code in years and someone came to me with an issue" kind of bug. And don't say "wow, you must have a great memory to remember the code", I don't. I have a general memory disability. Code takes on shapes in my head, and I can remember the shapes, how they fit together, what they abstractly represent, but not what the actual code is.

  5. Bug or feature? by BKDotCom · · Score: 2

    The alternative would be "features"

  6. Linus is mostly right by gweihir · · Score: 1

    At least when you take into account that people should design security in today. So from the coding angle, pretty much "just bugs". From the testing angle often vastly different, as in functionality testing you check for the presence of functionality, but in security testing you check for the absence of functionality. Individual tests are still pretty similar, but getting test-coverage is very different and a lot more difficult.

    Of course, the "just bugs" view also requires that the developers actually understand security. That is far more often not the case as with functionality bugs. Although even with functionality, quite a few coders do not really know what they are doing. So again, not quite the same thing, but also not quite different either.

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    1. Re:Linus is mostly right by DontBeAMoran · · Score: 1

      We will NEVER, EVER have 100% of all developers understand security at the level required to make 100% secure programs.

      What we need is OS and languages that have security built-in, the same way programmers don't know assembly and UEFI and yet can still code and make programs.

      --
      #DeleteFacebook
    2. Re:Linus is mostly right by NicknameUnavailable · · Score: 1

      Linus is usually right, it's just he says the right thing in the way which makes him sound like the largest asshole possible. Personally I find it refreshing.

    3. Re:Linus is mostly right by NicknameUnavailable · · Score: 1

      Why? If someone doesn't understand security they write shit code, which leads to shit products, which leads to loss of money. In turn people who do understand security (a necessarily smaller proportion of the population, who happen to be much smarter) demand a higher degree of compensation. This is one of the few areas where society is rewarding intellect, don't fuck it up by conveying even more tools from the intellectual superior to their plebeian counterparts - you're advocating for reverse evolution.

    4. Re:Linus is mostly right by gweihir · · Score: 1

      So? Why would "100% secure programs" be desirable? This is the thinking of a complete amateur in the security-space. Security is risk management. You never do risk mitigation to "100%" in reality. It is stupid.

      And "OS and languages that have security built-in"? Have you completely ignored all attempts and all research on that for the, oh, last 40 years or so? It cannot be done and asking for it is, again, stupid.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    5. Re:Linus is mostly right by gweihir · · Score: 1

      There is also a 3rd class of coders, which one of my Application Security students pointed out last year: Those that do not really understand security, but know it is difficult and that get help from an expert when they need it. While this may be a bit underwhelming as result of my teaching efforts, I have to say he really got it.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    6. Re:Linus is mostly right by gweihir · · Score: 1

      It is. You do not have to cut through the BS as with so many other people. Without that, Linux would never have grown to the quality-level it currently is at. While not perfect, it is pretty good, provided competent system administration and good competent coding.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    7. Re:Linus is mostly right by DontBeAMoran · · Score: 1

      And there's reality, where there's deadlines and a lack of funds but the project must still be delivered. Functionality wins over security almost every time.

      --
      #DeleteFacebook
    8. Re: Linus is mostly right by Anonymous Coward · · Score: 0

      He refers to Algol mainframes. You can buy them from Unisys and ICL/Fujitsu. And I think he has a point.

      The Unix/C approach is very brittle. Local errors escalate to total subversion in most instances.

      About 50 percent of operating system CVE entries are of this type.

    9. Re:Linus is mostly right by gweihir · · Score: 1

      That is not a coding problem. That is a problem with lack of management liability.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  7. Finnish translation by Anonymous Coward · · Score: 0

    "Security is a problem I just don't want to work on."

    1. Re: Finnish translation by F.Ultra · · Score: 1

      You suck terrible at Finnish, that's for sure.

    2. Re: Finnish translation by Anonymous Coward · · Score: 0

      You suck good at penis, that's for sure

    3. Re: Finnish translation by Anonymous Coward · · Score: 0

      The only thing that's sure is that you either didn't get the joke or were offended by it. Either way, the real joke ends up being you.

    4. Re: Finnish translation by Anonymous Coward · · Score: 0

      I'm Finnish, and no, I didn't get the joke, if there was one.

  8. Linus is smart but he's also sometimes wrong by Anonymous Coward · · Score: 1

    Security problems are not 'just bugs'. Security mechanisms realizes functionality that's on top of business logic that has to be realized.

    For example consider cleaning passed data to prevent SQL injection attacks. No business logic requires the software to do this. If it's not implemented, it's *not* a bug. You only implement data cleaning to prevent the specific attack.

    Nevertheless, a lot of security problems are bugs, but not all.

    1. Re:Linus is smart but he's also sometimes wrong by Junta · · Score: 2

      The patch submitter agreed with him, don't know why everyone is jumping to white knight for him.

      Torvalds point is that it can wait, and that it can be phased in. The proposal is a hardening scheme and there's a long history of hardening schemes breaking valid usage inadvertently. Torvalds perspective is that it can be done carefully, it's a nice to have, but it's not going to save the world and it's not so terrible for it to wait a little while to make sure it is right. The patch submitter said that he did a whitelist, then realized late that there were problems, added a fallback, but now it could be removed. Torvalds rightfully felt there was no way his test effort would be adequate to become a staple of the stable kernel as-is, and even suggested a course of adding a warning mechanism first to help get data to determine the risks of the mechanism.

      The problem is that security folks have gone crazy and think only security matters, risking legitimate usage scenarios for the sake of security. Also, any attack is a reason to add more locks. It's like if I read that someone in my neighborhood got their house broken into because they left their door open, then I move. Then I read that someone else from that neighborhood had the same thing happen when they left the door open, and I install another lock on the door. Then it happens again and I construct an underground bunker. All the time it's because folks are leaving their doors open, but every time scares me into taking more and more unreasonable measures to counter the victimizations of those less careful.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    2. Re:Linus is smart but he's also sometimes wrong by Anonymous Coward · · Score: 0

      Never ever clean up inputs from SQL injection attacks. You should blindly accept and properly insert the field in the database.
      They way of not getting subsectable by an SQL injection attack is to simply not build up an SQL string with those fields.

      Use prepared statements and bind arguments properly.

    3. Re:Linus is smart but he's also sometimes wrong by Anonymous Coward · · Score: 0

      The security folks I know are well aware that security isn't the only thing that matters - but they see it as their job as security folks to at least make people aware of the security implications and push for more security. It's sort of like being a defense lawyer for someone you *know* is guilty - defense lawyers still have to defend their client in court, do they not?

    4. Re:Linus is smart but he's also sometimes wrong by DivineKnight · · Score: 1

      I prefer Base64 encoding the inputs, and continuing in my meandering way to build things from SQL strings. Quite frankly, no expects the Base64 encoding, and it works on, I think, everything...just need to write an extra function to decode the data when looking for stuff in the database.

  9. Assuming he has a clear requirement for security by Chrisq · · Score: 1

    Assuming he has a requirement for security then of course he's right

  10. Doesn't matter by SCVonSteroids · · Score: 2

    You can word it the way you want. If it's not secure, it's not secure.

    --
    I tend to rant.
    1. Re:Doesn't matter by jwhitener · · Score: 1

      If you read the whole article, you'll see that your attitude is exactly what Linus' was railing against.

      You can word it the way you want. If it's not secure, it's not secure.

      Translating your wording into Linus' thinking:

      You can word it the way you want. If it's not usable, it's not worth anything.

      His point was that people were breaking things in the kernel in order to 'fix' security bugs. And he stated something like "if it is a broken piece of crap, no one will use it, so who cares how secure it is then?".

    2. Re:Doesn't matter by SCVonSteroids · · Score: 1

      Translating your wording into Linus' thinking:

      You can word it the way you want. If it's not usable, it's not worth anything.

      That's not a translation, that's re-wording what I said. I don't know how Linus thinks, but from what I can see through my years of reading /. he thinks in a "get things done" manner and should you get in the way of that, he won't shy from telling you in the worst way possible. That's about the bulk of what I know about him, not very interested in knowing more; Linux just isn't that big a priority/interest for me or the work that I do daily.

      His point was that people were breaking things in the kernel in order to 'fix' security bugs. And he stated something like "if it is a broken piece of crap, no one will use it, so who cares how secure it is then?".

      "Something like"? No he either stated it or he didn't. Why are you so obsessed with re-wording other people's statements? I searched the "article" (as you call it) and no mention of "if it is a broken piece of crap" came up.

      From the sounds of it, someone was trying to push code (or was asking for changes or rules to be added, whatever) that would kill the system should something illegal be happening. That sounds like a fundamentally stupid thing to do on a critical system, or any system for that matter... So I can understand why anyone with a brain would rage at that.

      tl;dr : You like re-wording other people's statements and Linus likes to rage. News at 11.

      --
      I tend to rant.
  11. Here's a more complete discussion of the issue. by mspohr · · Score: 5, Informative
    --
    I don't read your sig. Why are you reading mine?
    1. Re:Here's a more complete discussion of the issue. by Anonymous Coward · · Score: 1

      tl;dr: Torvalds says he won't take a patch that arbitrarily kills processes just because it looks like they're doing something bad. He wants to warn for at least a year, and try to fix as many cases as possible first.

    2. Re:Here's a more complete discussion of the issue. by gweihir · · Score: 1

      Which is reasonable. Only if this is the only way to prevent major attack activity going on is it the right thing to start killing processes. The update in the article by Errata Security is spot on though: Most security people are not developers and that severely limits their perspective. Personally, as security person that is also an (occasional) developer, I cannot imagine how you actually can do good things in the security space without at least some real hands-on experience of software development. Yet I encounter security people that cannot code or cannot code well all the time professionally and they suck at their job as a consequence.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  12. Didn't Linus approve this? by Hrrrg · · Score: 1

    I thought that Linus personally approves all the changes to the kernel. So didn't he approve the changes he is complaining about?

  13. I agree... with certain assumed contexts by adosch · · Score: 1

    I couldn't agree more with Linus. It's not like we know each other or have Thanksgiving together; he's right in his own non-PC way. As long as we're talking about a bug not being: 1) maliciously intended code or put there 'on purpose', 2) functionality or operability that falls into as not-as-advertised, or blatantly didn't follow an RFP or standard or 3) hell, stuff that was just overlooked, seemingly over/under-engineered or ego-over-good-code.

    ...I'm sure there's a few more mental dice-up catalogs to expand on, but at the end of the day, that's how I'm looking at it. Anyone who has written any sort of code with any language any any level has dealt with this. Unless, it's extremely intended, it's a bug to me (what do the new kids call it these days? A glitch?) --- then we can put all the metadata and sub-categories onto that logical gaff of a bug as we want at that point in terms of 'where' it falls so some Agile scrum party can have a scrum-stick-beating party to organize what is prioritized over what.

  14. Re:Tell that to Equifax by Junta · · Score: 1

    The question was *how* equifax was hacked. Was it through a measure that this would have prevented? Probably not, it was probably much more mundane.

    The patch may be a nice improvement and ultimately a good idea, but it's a hardening improvement, not a fix for a specific vulnearabilty, so caution must be taken. You can't just invoke the 'security' card as a 'nothing else matters' when dealing with adding security features.

    Security vulnerablities are urgent, security mitigation features are important, but less urgent and are worth the time to get them *right*. One thing is to not break function, but also to make sure that feature is comprehensive, lest you end up with a myriad of complex code to paste over the gaps of the last thing.

    --
    XML is like violence. If it doesn't solve the problem, use more.
  15. All data security is through obscurity by sjbe · · Score: 1, Insightful

    Security by obscurity

    All data security is essentially security through obscurity. Vault combinations, cryptography, keys, etc are all rely on various forms of information that is not widely known. The security comes through obscure information. Now there are forms of "security" through obscurity which are trivial to figure out and thus effectively worthless but even the most robust cryptography is still security through obscurity at its core.

    1. Re:All data security is through obscurity by Opportunist · · Score: 5, Informative

      When we talk about security by obscurity we mean that the way of how the security is produced is obscured. Not that a certain secret, a key, has to be kept secret to use it.

      PGP contains a private key, this is not what obscurity means in this context. What obscurity means is when the basic algorithm used to produce the encrypted result is not open to a public audit.

      The key is secret. Not the lock. Big difference.

      --
      We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
    2. Re:All data security is through obscurity by mark-t · · Score: 1

      The security of quantum cryptography does not depend on obscured information, but from the property of unreproducibility

    3. Re:All data security is through obscurity by Anonymous Coward · · Score: 0

      I thought "security through obscurity" meant depending on people not knowing the door is unlocked?

    4. Re:All data security is through obscurity by WaffleMonster · · Score: 1

      The security of quantum cryptography does not depend on obscured information, but from the property of unreproducibility

      It entirely depends entirely on classical sources of trust. In the simplest of terms Quantum crypto is all about refreshing keys amongst communicating peers. You still need trust in the form of hidden secrets to start otherwise there is no way of having any assurance who is on the other end.

      The anti-eavesdropping properties of quantum don't mean squat when your spilling the beans to Malice instead of Alice.

    5. Re:All data security is through obscurity by mark-t · · Score: 1

      I was under the impression we were talking about security, not authentication. Authentication mechanisms might require secrets (eg, passwords, etc), but they still depend on good security systems underneath them to be reliable, and while many security systems by themselves might depend on hidden or obscured knowledge, it is not an inherent property in security in general. Sometimes the laws of physics themselves can provide all of the security that is or sometimes could possibly be imagined.

    6. Re:All data security is through obscurity by WaffleMonster · · Score: 1

      I was under the impression we were talking about security, not authentication.

      I'm really sorry I don't read in threaded mode and going back it looks like the entire thread amounts to a childish word game as to whether the word "obscurity" applies to intentionally kept secrets.

      All I read was your post and pointed out correctly it is factually incorrect. I have no interest in the underlying question. Quantum crypto requires classical secrets to be kept end of story.

    7. Re: All data security is through obscurity by Anonymous Coward · · Score: 0

      Bullshit. Obscurity is hiding bugs in a binary and hoping nobody will bother to run IDA pro against the 'secure' program.

    8. Re:All data security is through obscurity by mark-t · · Score: 1

      I'm really sorry I don't read in threaded mode ...

      Or, apparently, the post topic:

      Re:All data security is through obscurity

      But that's irrelevant.

      If you are going to assert that a comment is factually incorrect without even claiming to be aware of the context in which it was said, be aware that such a claim is very liable to have little to no resemblance to reality.

      Quantum crypto only requires secrets to be kept if you need to authenticate... Which is not inherently necessary for cryptography... for example, in a secured point to point fiber connection, which in the case of quantum crypto is impossible to eavesdrop on without alerting the parties involved.

    9. Re:All data security is through obscurity by Anonymous Coward · · Score: 0

      Actually, quantum cryptography just uses quantum messages to send a key that is verifiably not compromised between two points. As I understand it, everything else about it is classical.

    10. Re:All data security is through obscurity by Anonymous Coward · · Score: 0

      "unreproducibility"; with current technology = security through obscurity.

    11. Re: All data security is through obscurity by Zero__Kelvin · · Score: 1

      You don't understand the term. I suggest you research it before using it again to avoid looking foolish in the future.

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    12. Re:All data security is through obscurity by mark-t · · Score: 1

      No... because the reasons why it is irreproducible are well known and defined by quite well understood physical laws. There is no obscurity involved, at any level.

    13. Re:All data security is through obscurity by Opportunist · · Score: 1

      "Security by obscurity", in its utmost extent, means that you must not know how the lock works because if you knew the lock would be worthless. In IT security it means that knowing the algorithm used to encrypt already weakens or even eliminates the security. A good example thereof is pretty much all Pre-WW2 encryption, e.g. the good old Caesar cipher. Knowing that a text is encrypted with the Caesar already tells you enough that 26 attempts at breaking later you have the clear text.

      I think it is easy to see that a cipher that is not weakened even if the adversary knows not only the cipher used but even potentially the actual implementation (as is the case with PGP) is superior.

      --
      We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
    14. Re:All data security is through obscurity by Anonymous Coward · · Score: 0

      That doesn't mean that it is a good idea to tell everyone what algorithm you use.
      Every now and then someone discovers a vulnerability.
      If you previously advertised that you are a possible target then attackers will use that opportunity. Not because they want to target you specifically but because you are known to be an easy target until you have updated your algorithm to a more secure one.

      You should never rely on obscurity to be your only security, but as an extra layer it shouldn't be disregarded.
      Just moving your login from port 22 might not be considered good security but it sure stops a lot of attempts.

    15. Re:All data security is through obscurity by WaffleMonster · · Score: 1

      Quantum crypto only requires secrets to be kept if you need to authenticate...
      Which is not inherently necessary for cryptography...
      for example, in a secured point to point fiber connection, which in the case of quantum crypto is impossible to eavesdrop on without alerting the parties involved.

      If you draw a box big enough to encompass the full length of the wire and declare everything within the box to be physically secure and trustworthy there is no point in deploying quantum crypto or any crypto of any kind to protect the information transmitted over said wire. It is by definition secure and impossible to eavesdrop on because you say so.

      If on the other hand you are not willing to trust the wire (really smart idea) you deploy cryptography with or without quantum. This cryptography requires keeping secrets as a basis of operation necessary to protect information. There is no way around the requirement to keep secrets with regard to quantum crypto or normal crypto no matter what. Failure to keep secrets means you are left with no assurance of who it is you are communicating with rendering cryptographic component of security meaningless / worthless / unusable / dangerous / unfit for purpose. You can't separate the two in the real world. Trust is not optional. Cryptography without trust is an oxymoron.

      What you also can't do is have it both ways. You can't say on one hand a cable is physically secure therefore since it is secure quantum crypto performed over said cable is also secure. This is just playing with words as you can replace quantum crypto with plaintext and replay the same argument and it will have been no more or less valid.

      It amounts to a word game as ridiculous as worthless as the original word game that started this thread. It has no purchase on reality. All deployment of crypto requires keeping secrets. There is not some magical way around it. It doesn't exist and never will.

    16. Re:All data security is through obscurity by mark-t · · Score: 1
      If you draw a box big enough to encompass the full length of the wire and declare everything within the box to be physically secure and trustworthy there is no point in deploying quantum crypto or any crypto

      Obviously, but if only the endpoints are trustworthy (which can easily be the case, especially if the distance is more than a km or so.), and you cannot vouch for who else might be listening in. quantum crypto provides the assurance that nobody else is eavesdropping while you exchange data.

    17. Re:All data security is through obscurity by WaffleMonster · · Score: 1

      Obviously, but if only the endpoints are trustworthy (which can easily be the case, especially if the distance is more than a km or so.), and you cannot vouch for who else might be listening in. quantum crypto provides the assurance that nobody else is eavesdropping while you exchange data.

      Yes your absolutely correct. However your missing a key fact.

      This "assurance" is completely worthless in the face of an active MITM attack.

      If you don't control the wire you can't know whether Malice is sitting in the middle of it acting as a proxy between you and Alice. For all you know when you send a message to Alice your really talking to Malice who proxies the message along to Alice after intercepting it.

      You are certainly correct in that nobody else is eavesdropping on the data exchange between you and Malice... but umm... your now owned and all of your super secret secrets are compromised anyway because you were talking to the WRONG PERSON and you had NO WAY of knowing it. God does not hand out quantum MAC addresses. You need to figure out WHO it is your communicating with on your own.

      Why do you think the world bothers deploying PKI when they could just use anonymous DH to secure the worlds Internet traffic? It provides the same flavor of assurance as quantum crypto. No known practical attack for either system... all without keeping secrets. Both systems secure against passive observers.... and yes both systems FAIL miserably in the face of Active MITM.

      The only way to prevent being crushed by the fail whale is pre-arranged trust relationships which at it's core demands keeping secrets. As I said before and will continue to say believe me or not... there is no possible way around it. Establishing trust without guarding secrets is not a physically possible concept.

    18. Re:All data security is through obscurity by mark-t · · Score: 1

      You are certainly correct in that nobody else is eavesdropping on the data exchange between you and Malice... but umm... your now owned and all of your super secret secrets are compromised anyway because you were talking to the WRONG PERSON and you had NO WAY of knowing it.

      Not true... you can verify latency along the line and the other side. You know exactly how long the fiber is, and the propogation velocity of light in the fiber is well known, so it would be impacted significantly by any MitM attack. If an MitM tried to fake the latency signal to make it look like you were still talking on an uncompromised line, it would be different from what an atomic clock was measuring for the actual delay because of the different total distance that the signal was travelling.

    19. Re:All data security is through obscurity by WaffleMonster · · Score: 1

      Not true... you can verify latency along the line and the other side. You know exactly how long the fiber is, and the propogation velocity of light in the fiber is well known, so it would be impacted significantly by any MitM attack.

      So now we are moving away from quantum crypto and on to measuring propagation delay... Ok I'll bite.

      How is that coordinated? What does it matter if Alice ever sees a copy of the message? Is there some kind of secret handshake involved requiring Alice keeping secrets? To verify timing? You seem to imply one exists by verifying latency comment. How does a peer know when to expect data? Is there a secondary or secret OOB communications channel involved?

      Not that it matters any but speed of light thru an optical cable is ~2/3 C. If you need margins you can get them with free space optics.

    20. Re:All data security is through obscurity by mark-t · · Score: 1

      So now we are moving away from quantum crypto and on to measuring propagation delay

      Well yes... but there's nothing absolutely nothing secret about the speed of light.

      If a MitM doesn't relay the communication to the intended recipient at all, as you suggest, then the intended recipient would notice immediately that they aren't receiving expected data... and if the latency on the data is wrong, perhaps synced to an atomic clock feed on an unencrypted OOB radio channel, then they would know that the transmission was being intercepted. By virtue of being OTA, the side channel communication is immune to any MitM interception, and if the transmission of the OOB data itself is delayed by no less than the expected latency of the fibre, it cannot be utilized to fake the expected latency by the MitM attacker, because by the time they receive it, too much time has gone by to accurately fake the latency period on the fibre.

      Of course, as I said... this does assume that the source and destination endpoints have been secured, and for authentication, it would require a second reliable, but itself not necessarily encrypted, communication system exists alongside it, but using radio instead of fibre to prevent a MitM attack of it as well.

    21. Re:All data security is through obscurity by Opportunist · · Score: 1

      One should think so, but in the end it makes little if any difference.

      Using an even moderately sized RSA key (IIRC 512bit) for encryption means that you'd have to try about 1.8*10^302 combinations of primes. You think that multiplying that with 65535 ports makes any measurable difference?

      There are other attacks that are possible, and yes, some of them rely on weak or faulty implementation of the underlying algorithm. And yes, knowing that you use a weak implementation is useful. But not that you use a certain algorithm. If knowing the algorithm itself is already a weakness, replace the algorithm.

      --
      We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
    22. Re:All data security is through obscurity by WaffleMonster · · Score: 1

      If a MitM doesn't relay the communication to the intended recipient at all, as you suggest, then the intended recipient would notice immediately that they aren't receiving expected data...

      Assuming this even matters why would they know that? Is malice incapable of transmitting false data to Alice? If so why? Because it's secret? Because there is some trust relationship / coordination between the peers?

      and if the latency on the data is wrong, perhaps synced to an atomic clock feed on an unencrypted OOB radio channel, then they would know that the transmission was being intercepted.

      Why would the latency be wrong? You didn't answer the question of how the two coordinate... how does Alice know when the transmission started in order to measure latency in the first place? Simply having a common clocking source does not communicate anything about timing of data transmission itself. You can send this over an unencrypted communications link but that would be A. really stupid and B. link itself would be subject to trivial compromise. This is simply punting the same set of problems of trust from one link to another. It solves nothing.

      By virtue of being OTA, the side channel communication is immune to any MitM interception

      Yea right because RF can't be blocked and there is just one transmitter on the planet. Not that any of this matters at all being predicated on invalid assumptions enumerated above.

      and if the transmission of the OOB data itself is delayed by no less than the expected latency of the fibre, it cannot be utilized to fake the expected latency by the MitM attacker, because by the time they receive it, too much time has gone by to accurately fake the latency period on the fibre.

      Addressed why this is incorrect in the previous message. You can replace a section of fiber with free space optics and gain 1 ns of latency per yard. Not that it matters.

      Lambda switching works the same way in reverse. Rolls of fiber are used to delay signal so that FIB has enough time to switch to the appropriate destination but whether your catching up or slowing down the principal is the same.

      If your having trouble coming up with a new scheme have you considered using a focused neutrino source (e.g. linear accelerator) for low bitrate communications?

      What this all reminds me of is an inventor trying to find a way to implement a permanent magnet free energy generator. No matter how clever you are or how much you think you can outsmart GOD it never quite works out. There are certain principals underlying the fruitless journey you are on that that can't be bent by imagination. Your choices are to trust the wire or guard secrets. There is no third way.

    23. Re:All data security is through obscurity by mark-t · · Score: 1

      It's only feasible to block RF inside of an enclosed area... you can't feasibly block an entire RF signal that is outdoors. You could potentially jam it by flooding the airwaves with a stronger signal, but such jamming would be still be detected at the receiving end as a loss of signal, or a DOS attack.

      As for how to measure latency, well... you could design the fiber so that certain parts of the signal are always reflected back, and the latency can be measured that way, and design the overall communications protocol to utilize only the unreflected portions. If the MitM tries to read the signal that is supposed to be reflected instead of simply reflecting it with the intent of retransmitting it back with the expected latency, then it can be detected the same way any eavesdropper could be otherwise detected on a quantum encrypted data line. If the MitM simply reflects the signal the same way the intended recipient would, then the latency delay will not be right because the length of fiber between the MitM and the sender will not generally be the same as the known length of fiber between the sender and recipient. If the MitM tries to artificially lengthen the fiber, then the total transmission time between the source and destination is going to be longer, and the times that each side records for different events will be different, which can be detected based on the OOB communication. The OOB radio communication can easily be listened to by any third party, but is not useful in decrypting the data that was on the fiber, only useful in verifying its authenticity.

      The MitM would have to compromise either the area immediately around the transmitter or the area immediately around the receiver, both of which could be inside of secure facilities in order to have any success at blocking the signal from being received.

  16. Then go ahead and disable ASLR by Anonymous Coward · · Score: 0

    If kernel security problems were "just bugs", then go ahead and disable address space layout randomization. The system will be as stable as before (maybe even more stable). Surely disabling ASLR won't introduce bugs, however it certainly will introduce a security problem.

    1. Re:Then go ahead and disable ASLR by Dog-Cow · · Score: 1

      While the kernel may perform ASLR on itself, it's primarily to protect applications. Also, if you weren't an illiterate shitbag, you'd know that Linus is talking about patches that cause programs to be killed if they trigger bugs in the kernel. All Linus wants is for warnings to be generated instead, so those bugs can be fixed. ASLR doesn't crash programs. On purpose, anyway.

  17. The context of his statement is refusing to approv by raymorris · · Score: 4, Informative

    The context of the statement is that somebody submitted changes to the kernel and he denied the request.

    Somebody wanted to add "security" code that would kill of a process, or even the whole kernel, if it detected something that might be a security concern. So with the proposed change, programs would crash without warning if this new code detected a possible security problem. Most of what it detects aren't attacks, though, they are just bugs in the software that need to be tweaked to explicitly follow security rules. The new security code should first warn about these bugs rather than crashing the system, Linus said. Quoting him:

    So the hardening efforts should instead _start_ from the standpoint of
    "let's warn about what looks dangerous, and maybe in a _year_ when
    we've warned for a long time, and we are confident that we've actually
    caught all the normal cases, _then_ we can start taking more drastic
    measures".

  18. In his world, he is right by Opportunist · · Score: 1

    His world being the world of the Linux Kernel. When you use this context then of course any security breach is due to a bug, simply because, well, what else should it be?

    Outside of that context... no.

    --
    We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
  19. In other news by CustomSolvers2 · · Score: 1

    Errata Security confirmed that they will not be changing their name to Much More Than Just Errata Security. LOL.

    --
    Custom Solvers 2.0 = Alvaro Carballo Garcia = varocarbas.
  20. Too many programmers in the kitchen... by Anonymous Coward · · Score: 0

    When you have multiple people looking at the same code and making numerous changes, bugs are inevitable in open source code.

    Source: "Rebel Code: Linux and the Open Source Revolution" by Glyn Moody

    1. Re:Too many programmers in the kitchen... by Anonymous Coward · · Score: 0

      That may be so in the general case, but changes to the Linux kernel are funneled through Torvalds. Most other open source projects also funnel changes through one or a very few authorized committers. Sure, anyone can fork the code and introduce whatever bugs they want, but if you're smart you'll take the curated branch, not Joe's random fork.

      Of course, large proprietary software also has multiple people looking at the same code and making numerous changes, so bugs are inevitable in closed source code too -- except for those very few cases where rigorous change control is enforced (like avionics code).

    2. Re: Too many programmers in the kitchen... by Anonymous Coward · · Score: 0

      Creimer affiliate spam, mod down.

  21. Poor design plays a role too by Anonymous Coward · · Score: 0

    For example: The order in which certain parts are done in a program can also be used to exploit certain feature, or the way things are stored can expose things even certain hardware or OS feature.
    Testing is the only tool most people use but there is also a lot of knowledge about this, there are guides specifically about security in certain languages, for example: https://www.cert.org/secure-coding/publications/books/secure-coding-c-c-second-edition.cfm

  22. Unconvincing statement by Anonymous Coward · · Score: 0

    Something sounds a little off about that one.

  23. For some value of âoebugâ by santiago · · Score: 1

    Thereâ(TM)s âoeyou forgot to check array bounds hereâ bugs, and then thereâ(TM)s âoeyour entire design is fundamentally fucked and insecureâ bugsâ¦

  24. AKA... by 1080bogus · · Score: 1

    Features....to certain 3 letter agencies

  25. Re: For some value of "bug" by santiago · · Score: 1

    And then there's "it's 2017 and we've never heard of UTF-8" bugs.

  26. Vocab [Re:Security problems are NOT just bugs] by Tablizer · · Score: 1

    Is there any objective and consistent working definition and/or test of "bug" versus "bad design"? I suspect there is a lot of gray area such that Laynes Law will reign over such discussions.

    1. Re:Vocab [Re:Security problems are NOT just bugs] by sinij · · Score: 1

      To me, Laynes Law implies that there exists universal truth and it is knowable. I disagree with that.

      To me, bad design is understanding undesirable consequence and proceeding with them. For example, leaving default hard-coded credentials for the service team to remotely access your product. You can't call this a bug - the functionality is intentional.

    2. Re:Vocab [Re:Security problems are NOT just bugs] by Anonymous Coward · · Score: 0

      Bad design that is not a bug still gets you the results you want (and not what you don't want) even though the method of getting them may be sub-optimal.

      A bug means you don't get what you want (or you get what you don't want).

      A bug in the specification may lead to bad design, and although the implementation may do exactly what the specification says, it doesn't do what the specifier wanted. Is that a bug in the program? No, it's a bug in the specification.

    3. Re:Vocab [Re:Security problems are NOT just bugs] by Anonymous Coward · · Score: 0

      A bug is when something is not working to spec. A spec does not need to define all cases. Like what about the case when a blackhole consumes the Earth? Spec leaves it undefined and lets the implementer decide. Is it a bug that the data gets corrupted in the case when the Earth gets destroyed? Nope? Then it also does not matter if the application allows some other unforeseen consequence of an undefined case.

      "Bug" only applies to defined cases and when the system is not working to spec.

    4. Re:Vocab [Re:Security problems are NOT just bugs] by Tablizer · · Score: 1

      To me, Laynes Law implies that there exists universal truth and it is knowable. I disagree with that.

      But if people interpret terms different, then they are talking past each other. To me, Laynes Law is only describing the side-effects of using mis-matched meanings, NOT putting a value judgement on them: "If X is not true, then Y happens", where X is a common/consistent understanding of a term, and Y is chaos and anger. If X were wearing seat-belts and Y is death, then stating the relationship is not necessarily condoning seat-belts, but merely describing a relationship between two conditions.

      For example, leaving default hard-coded credentials for the service team to remotely access your product. You can't call this a bug - the functionality is intentional.

      The alternative for the org may be to spend $2000 to fly a techie to remote locations when passwords expire or are lost. Allowing phone-in passwords has social-engineering-hacking risk also. The customer is ultimately the boss because they can fire you if they don't like your implementation decisions.

      I agree it's up to engineers to recommend best practices, but ultimately the decision is up to the those paying you to write software. If the customer wants "bad" features, you have to give them bad features (barring legal risk to yourself). If they want to gamble, it's their money. (Do document and save your recommendations for CYA.)

    5. Re:Vocab [Re:Security problems are NOT just bugs] by Tablizer · · Score: 1

      Intents are not always clear. Sometimes we go by somewhat fuzzy notions of intent without spelling out exactly what our intent is.

      Then real world conditions come along and make us realize that we didn't consider certain conditions thoroughly enough. After all, the human brain cannot emulate/anticipate every possible execution path of a non-trivial system.

      It may be we considered typical conditions, but non-typical conditions came along that we just simply didn't anticipate either because we've never seen it happen before, or we just are not smart enough run enough permutations in our head.

    6. Re:Vocab [Re:Security problems are NOT just bugs] by Tablizer · · Score: 1

      Specs will inherently have some vagueness. If they were precise enough to avoid any ambiguity, they'd BE code.

    7. Re:Vocab [Re:Security problems are NOT just bugs] by gunslnger · · Score: 1

      A bug is code that does not behave as intended or expected. The design is the description of the intent. So bugs are limited to the scope of the design. Design flaws can include things that are outside of the scope of the design, things that weren't taken into account by the design. So, design flaws are not bugs.

  27. IBM Linux Google/Facebook by Anonymous Coward · · Score: 0

    Linus disrupted the dinosaurs of the IBM era.

    But in the same way the IBM PC became irrelevant in the 90's, so Linus has become irrelevant now.

    Yes, half the world's infrastructure is built on linux, but taking Linus seriously on an issue like security is like caring about wheel manufacturers' opinions on using generative AI networks to optimize traffic flow.

  28. Not at all by Anonymous Coward · · Score: 0

    No Mr. Linux, I'm sorry but there are several documented software engineering practices that can be exploited by malicious hackers to gain control of a system ("client side authentication" is just an example), but neither of these practices are "software bugs".

  29. linus vs grsecurity by NynexNinja · · Score: 1

    Linus has been going back and forth with grsecurity about the patch set they have put out. All I know is that over the years all the kernel bugs that have allowed for local and remote stack overflows, my systems have not been compromised because of the use of the grsecurity patches. It's a shame that the guy who puts out the grsec patches is trying to charge money for them, but its also a shame that some of these standard features like no-exec-stack patch and trusted-path-execution patches have not been implemented into the mainline kernel tree over two decades.

    1. Re:linus vs grsecurity by Anonymous Coward · · Score: 0

      my systems have not been compromised

      That you know of.

    2. Re:linus vs grsecurity by Anonymous Coward · · Score: 0

      The grsecurity wikipedia page paints a slightly different picture.

  30. Re:The context of his statement is refusing to app by f00zbll · · Score: 1
    That's how I read it too.

    I agree with Linus in this specific case. Killing the kernel is not an acceptable practice because some program did something questionable. It's probably some shit code that did something bad or unintentional. If every time the kernel panicked and crashed, you better not surf the web. Some shitty flash ad will crash your kernel a few times a day.

  31. Yes! by nightfire-unique · · Score: 1

    This succinctly summarizes what I've been trying to relate to others for quite some time.

    "Active" security is generally treating the symptoms of poor quality software. selinux, "SafetyNet," virus scanners .. all of these things, while masking some issues, add code complexity and expose a larger attack surface.

    Simple, clean, elegant, and obviously correct code (and that includes design) needs no complex "security" bolted on. It just needs to function as documented.

    --
    A government is a body of people notably ungoverned - AC
    1. Re:Yes! by gweihir · · Score: 1

      The problem here is that writing simple, clean and obviously secure code (which usually is also much more compact) is really hard and most people cannot do it. The most universal principle for secure, reliable and maintainable code is KISS. Yet we see evermore bloated abominations performing security critical functions, because the people creating them have huge egos and small skills.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    2. Re:Yes! by denbesten · · Score: 1

      SELinux has very little to do with how "good" software is or is not. More than anything else, it addresses the fact that the Posix file permissions (e.g. -rwx-rw-r--) are not expressive enough to describe complex access control scenarios.

      Using SELinux for "fine-grained access control" and "defense in depth" is useful in part because "obviously correct code" has a history of being proven otherwise over time.

  32. Re:kernel Security problems are NOT just bugs by redelm · · Score: 1

    Granted from Linus' kernel perspective, _MOST_ security problems are caused by bugs. Userspace has far more bugs, and proportionally more caused by poor design & implementation. However, loadable kernel modules are a security hazard that has been designed-in.

  33. Re:kernel Security problems are NOT just bugs by OneSmartFellow · · Score: 1

    Except that permission has to be granted to load a kernel module.  It doesn't happen by accident (in a normally configured system)

  34. Re: For some value of "bug" by Anonymous Coward · · Score: 0

    And finally there's the "didn't hit Preview before Submit" bugs.

  35. If they're just bugs by Anonymous Coward · · Score: 0

    If they're just bugs, then there's always a technical solution, and a perfect technical solution at that. Why haven't you fixed all the bugs Linus? Spearfishing is a bug? Physical security is a bug?

    1. Re:If they're just bugs by Dog-Cow · · Score: 1

      You're a bug. Here's to hoping someone squashes you.

  36. Ahhhh, karma by Anonymous Coward · · Score: 0

    I'm just overjoyed to see someone from Team Hubris get their ass handed to them in such eloquent style.

    LOL@vword: crashed

  37. Potty mouth by Anonymous Coward · · Score: 0

    My kindergarten teacher told me its not nice to have a Potty mouth especially if you're a big boy.

  38. Re:They're bugs.. Just look a systemd by Anonymous Coward · · Score: 1

    So I totally agree with Linus on this one. I mean, just look at the bug that is Systemd. It's a security hole waiting to happen.

  39. Re:kernel Security problems are NOT just bugs by redelm · · Score: 1

    `insmod` is tough? Modifying a commonly used module, perhaps one loaded later (vfat)? Modules do have a checksum, easy to fix. They do not have any crypto-signing which might verify integrity.

  40. As usual ... by Qbertino · · Score: 2

    ... Linus doesn't mince words when it comes to pointing out bad software development.

    As usual, he's right.

    And before you object, think for a moment if it could actually be the case that he knows what he is talking about and may even be a better programmer than you. And that your should maybe listen to what he has to say.

    My 2 cents.

    --
    We suffer more in our imagination than in reality. - Seneca
  41. Linux is awesome by sheph · · Score: 1

    I love Linux. It's an awesome OS. I like Linus a lot too. He's contributed a great deal to computing. However, calling people names doesn't really fix anything. On this particular issue I feel that he's wrong in his assessment as well. There is a distinct difference between a bug that causes a failure in functionality as opposed to a bug that exposes a system from a security standpoint. He's right in that both are bugs, but the consequences are much higher when it is security related, and that's why we treat them differently. That being said there is also a well established divide between security analysts, and developers. As a developer we just want stuff to work, and often times security makes that difficult. As a security analyst we want to keep the system secure (in some cases need to - think compliance), and often times developers make that difficult. I wear both hats in my position so I see it all the time. Ultimately it's in everyone's interest to work together to create code that both works, and is secure. Engaging in a pissing match does nothing useful.

    --
    I don't believe in karma, I just call it like I see it.
    1. Re:Linux is awesome by sheph · · Score: 1

      Guess I should have read the articles first. My comment was based on the summary. After reading what he wrote I agree with him on principle. Kill on sight is a bad approach that's going to break things and make them non-functional. That doesn't make you many friends. The problem is issuing a warning calls attention to the flaws and could show where an attack would be successful. It's a delicate balance to be sure.

      --
      I don't believe in karma, I just call it like I see it.
  42. More plausible if extended with... by Anonymous Coward · · Score: 0

    ...are just bugs, that require the highest attention.

  43. Re: For some value of "bug" by santiago · · Score: 1

    No preview on mobile. :(

  44. Getting away from monolithic kernels... by Anonymous Coward · · Score: 0

    but... the performance issue. Micro v. Mono is so often argued on /. you can make a drinking game out of it. But the conclusion always comes down to poor (read: non-workable) performance on a pure micro-kernel. OTOH, hardware keeps getting better, perhaps with real breakthroughs on the horizon, and maybe an architecture could come along that's more suitable to a micro-kernel. Could the day of the practical micro-kernel come some day? or will it always be just a distracting off-topic discussion that stalls once performance is seriously considered?

    1. Re:Getting away from monolithic kernels... by Anonymous Coward · · Score: 0

      That micro-kernel proponents believe performance is the only/biggest issue is another of those problems.
      1) A micro-kernel often results in all kinds of complications during driver development. That extra time spent there is less time spent on other things, like fixing bugs.
      2) Putting drivers in user-space is completely useless when many devices have full control over your computer anyway. The device has a DMA engine? Exploiting the driver will give you full access to the machine. Oh, so you put the DMA part in the micro-kernel to validate it? Well, then you upload a hacked firmware. Oh, so you put firmware loading in the microkernel? And when is the microkernel no longer micro then? Or do you decide to just not support any systems without IOMMU? And refuse to support firewire?

    2. Re: Getting away from monolithic kernels... by Anonymous Coward · · Score: 0

      The micro/monilithic discussion goes away if you stop use memory-unsafe languages such as C.

      A kernel implemented in a memory safe language is much better at keeping bug effects localized.

      See singularity os and the algol mainframes. The unix/C/MMU approach is actually quite shitty.

    3. Re: Getting away from monolithic kernels... by Anonymous Coward · · Score: 0

      I don't see what microkernel vs. monolithic has to do with language features.

      The whole point is to isolate code from the kernel if it doesn't need supervisor privileges, minimizing the damage that can be done to the system by error-ridden or malicious code.

      Supervisor/user mode doesn't go away just because you use a memory-safe language (i.e. no pointers).

  45. Re:They're bugs.. Just look a systemd by HiThere · · Score: 1

    I may dislike systemd, and the direction that it is pushing things, but that isn't sufficient to justify calling it a bug. A flat head screw isn't a bug instead of a phillips, it's just designed for different applications.

    --

    I think we've pushed this "anyone can grow up to be president" thing too far.
  46. BSDs by Anonymous Coward · · Score: 0

    In the full context, I think he has a point; he was arguing against panicking the kernel when an out-of-spec situation is found. The security guy's (Kees) patch presumed that out-of-spec indicated an attack, when it most likely just indicates a bug. Being a security guy myself, I sympathize with Kees, we tend to think about things in terms of how to mitigate possible attacks, and reducing pwnage to DoS is a good thing. Not so much, though, if the panic gets triggered a lot by ordinary bugs. In that case, we need to detect the problems, but continuing to run is good.

    The BSD folks have already gone through this. You cannot always know ahead of time which bugs will lead to security problems.

    OpenBSD's thinking:

    Our security auditing team typically has between six and twelve members who continue to search for and fix new security holes. We have been auditing since the summer of 1996. The process we follow to increase security is simply a comprehensive file-by-file analysis of every critical software component. We are not so much looking for security holes, as we are looking for basic software bugs, and if years later someone discovers the problem used to be a security issue, and we fixed it because it was just a bug, well, all the better.

    * https://www.openbsd.org/security.html

    In the FreeBSD 4/5 time frame a whole bunch of ASSERTs were added to the kernel, which caused many panics and thus much annoyance. But this forced the developers to look at each panic and often caused a code clean up which in turn helped long-term stability. Even now there are a bunch of #defines enabled in FreeBSD during development that are removed when a release is tagged.

    Perhaps there should be a DASSERT (debug-ASSERT) that can be enabled during development, and that is then disabled for production releases. This allows devs to experience pain and help to fix things, but will less likely to hurt actual production systems. If you enable the (compile-time? runtime sysctl) option, DASSERT maps to ASSERT, otherwise to maps to a NOP or a kprintf.

  47. And they wonder why I always recommend BSD by Anonymous Coward · · Score: 0

    So long as Linus is in charge Linux will be the laughing stock of the security world. Linus is a decent enough programmer, but he doesn't understand security and has hurt his own project immesurably to the point where many of us in the security research community have dumped it and run Windows on our laptops and BSD on our servers.

  48. Social Engineering by Anonymous Coward · · Score: 0

    Most effective security threat. Not a bug.

  49. Perspective by denbesten · · Score: 1

    Perspectives will vary by profession. Once you get outside of software development, I suggest that most security problems are the result of either failing to promptly update software, failure to properly configure software, or incomplete risk analysis. For example:

    The Pentagon leak appears to be a a failure to properly configure access controls.

    Equifax was a failure to update software after a bug was found/fixed.

    Fukushima was a failure to consider the risks during the design process.

    Linus' perspective is from that of a software developer. I suspect Linus' rant stems from people writing
    if ( badinput() ) kernelpanic();
    instead of
    if ( badinput() ) return(Error);.

    As a "security person", I happen to agree with Linus that allowing bad input to result in a denial-of-service attack is rarely the best response.

  50. OpenBSD has said this for years by nuckfuts · · Score: 2

    OpenBSD has promoted this belief for years. The description of their audit process states...

    "Another facet of our security auditing process is its proactiveness. In most cases we have found that the determination of exploitability is not an issue. During our ongoing auditing process we find many bugs, and endeavor to fix them even though exploitability is not proven. We fix the bug, and we move on to find other bugs to fix. We have fixed many simple and obvious careless programming errors in code and only months later discovered that the problems were in fact exploitable. (Or, more likely someone on BUGTRAQ would report that other operating systems were vulnerable to a `newly discovered problem', and then it would be discovered that OpenBSD had been fixed in a previous release). In other cases we have been saved from full exploitability of complex step-by-step attacks because we had fixed one of the intermediate steps."

  51. Linus by Anonymous Coward · · Score: 0

    Some security problems are just features. Shut the fuck up Linus. Nobody cares for your worthless opinions

  52. Linus is back :) by phil42 · · Score: 2, Insightful

    it is great to see that "kinder gentler Linus" has gone away and good old "kick 'em in the ass Linus" is back.

    Linus' outrageous remarks serve kernel development well

  53. Re:kernel Security problems are NOT just bugs by Dog-Cow · · Score: 1

    Nobody said it was "tough", the GP wrote that it requires permissions. If you have root, loading a module is not really the most pressing of your security concerns.

  54. Sanctimonious Bastards by scdeimos · · Score: 1
    You really should read the entirey of Errata Security's blog post for context (I know, this is /.) but this is so true...

    Update: No, it's probably not okay to call people "morons" as Linus does. They may be wrong, but they usually are reasonable people. On the other hand, security people tend to be sanctimonious bastards with rigid thinking, so after he as dealt with that minority, I can see why Linus treats all security people that way.

  55. so a bug is pre or post exploit by Anonymous Coward · · Score: 0

    Seems like this applies to everything. If a lock is broken then the bug is that the lock isn't strong enough. If the encryption is broken then the encryption isn't strong enough so bug. What about using an F bomb when talking...is that a bug in your thought pattern?

  56. I really wish Linus would grow up by TekPolitik · · Score: 1

    His statement might be right (and probably is) but there is no need for him to express himself that way. He's not a teenager anymore, he's in his late 40s and ought to be able to better control his impulses (or even be centred enough not to have them in the first place). His words would carry far more weight of he expressed himself more maturely.

    1. Re:I really wish Linus would grow up by Anonymous Coward · · Score: 0

      Linus explains here why he is rude, in short, to be clear and avoid giving false hope, which in the past has lead to big problems.
      Sure, many people can be clear and avoid giving false hope without being rude.
      But perhaps he has not found a way to be _able_ to do that _himself_, with the same (effective) _results_ as his current rudeness.
      Instead of blaming him for this (which I don't necessarily say you shouldn't), also consider the possibility he is just incapable of communicating in a better way (again, with the same results), or is just more afraid/intolerant of the consequences of misunderstandings due to his personal experiences in the past.
      Or, he is just rude and just doesn't care, but the above talk suggests there is more at play and it has a real and important function.

  57. Out of context by hlee · · Score: 2

    Got to read Linus' comment in context of his post, otherwise it's a gross generalization where you're just arguing about semantics and opinions.

    A better summarization of what Linus said is: take into account security aspects when designing a feature, so you don't rely on a kernel panic (or exceptions) when some rule is not observed.

    Here is something analogous I ran into recently regarding a Java SDK that was not designed with security in mind. Java has a SealedObject to protect sensitive data while in memory - great feature, but then things got messy when it came to dealing with String instances. In Java it is considered bad practice to use String type to represent any kind of sensitive data like passwords because the String is immutable (i.e. it can be visible in the heap for quite a while before getting garbage collected, and if a heap dump is triggered you are screwed). What it boiled down to was the current SDK had signatures like the following:

    setPassword(String pwd); // BAD!!!

    instead of:

    setPassword(char[] pwd); // better!

    If the SDK was designed with setPassword(char[]) to begin with, SealedObject library usage would have been much simpler and cleaner - no silly security rules. But thanks to cluelessness of setPassword(String) in the SDK, SealedObject library design became much messier due to security rule to throw an exception whenever it encountered String instances were used to represent sensitive data.

  58. Bugs by Anonymous Coward · · Score: 0

    Yes but languages like C make bugs really easy to make. I would say that most bugs (but not all) could be avoided by simply having a better language (like Rust or Haskell) for example.

  59. Possibly... by QuietLagoon · · Score: 1

    Well, if poor designs are bugs, then yes.

  60. Main fault is a design-time bug by Anonymous Coward · · Score: 0

    There are two different classes of bug that apply to systemD, namely design-time bugs and implementation bugs.

    The primary fault is a design bug, in that no complex system should ever be placed in PID 1. That's a fault that would have eliminated the systemD architecture from consideration early on, if the primary systemD developer and advocate had been a rational engineer who works off pro/con lists. But he's not an engineer unfortunately, but more like an ego-tripping hacker with an elevated opinion of his own infallibility.

    No complex system can be without bugs and so systemD is inevitably full of them, many latent until identified and fixed, but even fixes introduce new bugs. As systemD gets more and more complex, this situation just gets worse, not better. And PID 1 is exposed to this mess, because of the initial design-time bug.

  61. Re:The context of his statement is refusing to app by Anonymous Coward · · Score: 0

    Still sounds like a great patch to put in a research kernel, as it identifies bugs.

  62. Re:Tell that to Equifax by Anonymous Coward · · Score: 0

    Equifax security was complete crap. They weren't using any best practices. They started when security wasn't a large concern and never evolved their systems to modern standards. It was only a matter of time for them.

  63. Re:kernel Security problems are NOT just bugs by redelm · · Score: 1

    But if the attacker gets root, s/he can keep it, even through reboots and potentially kernel upgrades. For serious intrusion, Ring0 (x86/x64) is the goal, root is just a stepping stone. More to the point, just why do you think OpenBSD removed loadable module support 3 years ago? Theo may be ... peculiar ... but no-one can call him completely irrational without revealing themselves to be even moreso.

  64. Re:Linus is back :) by Anonymous Coward · · Score: 0

    linus was bought by big corporations long time ago, he's just a very useful moron

  65. He's Half Right by SwashbucklingCowboy · · Score: 1

    They are bugs, but there are particular kind of bug that allow bad people to do bad things to your computer or your data. There's a huge difference between a graph displaying text in the wrong sized font and a bad guy being able to steal your spreadsheet with all of your company's confidential data.

  66. IF people are insects, sure by Anonymous Coward · · Score: 0

    I'll buy into that.

  67. Linux already kills processes randomly by Anonymous Coward · · Score: 0

    "....Somebody wanted to add "security" code that would kill of a process,..."

    Linux already kills processes randomly. Here is how it works. Say you have 4GB RAM. Now the user starts 10 programs that in total reserve 10 GB RAM. That is ok as Linux happily overallocates RAM. As the 10 programs slowly use more and more RAM, the 4GB will get full. As soon as more than 4GB RAM has been used, Linux will start to kill processes randomly. Yes it is true and one of the reasons why Linux is considered unstable by Mainframe/Unix sysadmins.

    For instance, Solaris does not overallocate RAM. The user is not allowed to start programs that use more than 4GB RAM in total. Solaris does not need to kill processes randomly.

    1. Re:Linux already kills processes randomly by Anonymous Coward · · Score: 0

      > Linux already kills processes randomly.

      Show me the code in Linux where it randomly kills processes.

  68. OOM is no longer so random. vm.overcommit_memory by raymorris · · Score: 1

    We made the OOM killer smarter a few years ago.

    Anybody who chooses Solaris over Linux based on memory allocation policy is simply uninformed. If you set vm.overcommit_memory = 2, Linux will behave just like Solaris in this respect, except a tad safer. Linux is a tad smarter about memory allocation, whereas Solaris is very - uhm, "straightforward" (aka dumb).

    With Linux you can ALSO choose other options, depending on the workload, and can tune the exact percentages to best fit your workload. Solaris provides no such options. It does exactly what it does and that's it, the admin has no say in the matter. Programs just get fatal errors and crash, with no option to make appropriate use of swap etc.