← Back to context

Comment by Arbortheus

24 days ago

I hope some of these backdoors and/or 0-days being kept under wraps by nation states or corporate espionage companies (Pegasus et al) are being found incidentally through all this.

It’s frustrating to have all these 0days and CVEs to patch for now, but in the long run perhaps we’ll leave with more robust software.

The logical extrapolation of AI capabilities stress-testing human software is all bugs being discoverable. Hence, you have to aim for actually bug-free software.

The only way to do that is to make your code provable. That again is only realistically doable using AI.

In the process, people will have to turn the pretense of "software engineering" into reality, making the engineering part explicit.

That only works when humans actually understand what they're doing.

  • > "I have only proven [my code] correct, not bug free."

    > -- Donald Knuth (if I recall that exact quote correctly)

    Just because you have proven the correctness of your code, that does not mean that it is infallible. Especially -- as a lot of HN users point out -- there's intricate complexity that is likely to cause erroneous behavior if several interfaces/complexities get combined. And those might be caused, for example by a 'user' setting the driver to 'db.backend.sqlite' instead of 'db.backend.sqlite3'; and then you have suddenly an unexpected configuration.

    • Were you aiming for this? “Program testing can be used to show the presence of bugs, but never to show their absence!” ― Edsger W. Dijkstra

      Or the second one, that I would have attributed to Dijkstra, too: “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies.” C.A.R. Hoare, The 1980 ACM Turing Award Lecture

      1 reply →

    • Yes, you can also easily prove the wrong thing.

      That's why it doesn't suffice for only LLMs to know the relevant stuff.

      You can't have a zoo run by animals.

      9 replies →

    • Just because you have proven the correctness of your code, that does not mean that it is infallible.

      Can god make a zero-day even he can't find?

      1 reply →

    • This doesn't necessarily require proving everything mathematically, it also helps to design things in a way that doesn't rely on discipline to avoid gaping holes. For example, languages that allow pointer arithmetic, unchecked array access, or use-after-free have huge opportunities to make security errors that don't exist in languages without them.

      10 replies →

    • Play a bit with it, I started feeling like verification is just a slightly more aggressive fuzzer.

      There will also be compiler bugs, etc.

      The point is fewer bugs.

      1 reply →

    • Just because it works doesn’t mean it’s not broken.

      Anyone who has ever wielded a wrench should know that implicitly.

    • If the user is capable of setting an option which breaks everything then your code isn’t correct.

      That’s the whole point, you can find all of these things which would take far too much manual effort.

      10 replies →

    • > Just because you have proven the correctness of your code, that does not mean that it is infallible.

      Yes, but it gets you pretty far already.

    • Which implies that software engineers in the future won't be so cavalier in allowing mod-able or unix-like systems. There won't be an db.backend.sqlite since your software likely won't use a db, and if it does it will be a custom design. It won't be "if several interfaces" it will be "there are no interfaces" no programmer interfaces and certainly no user ones.

    • I mean, he wasn’t using, or even envisaging, a language that could natively support proofs.

      Personally I think proving Kubernetes, for instance, would be an exercise in pure frustration. There’s just too much to do.

      5 replies →

  • > The only way to do that is to make your code provable. That again is only realistically doable using AI.

    I think that LLMs actually cannot do this right now while people can?

    Also there is a lot of defensive programming that has been left to application and runtime layers because of dated security models in our OS and permissions that are way too coarse. It's a lot easier to write a correct program when you don't have to check every path and do that perfectly when the permission system can ensure that no files that haven't been whitelisted cannot be read

    • My intuition is the opposite? The math results we are seeing lately are done with theorem provers. LLMs are getting very good at this and surpassing what humans have been able to prove. Verified code is traditionally very expensive and only applicable in niche areas when done by humans.

      5 replies →

    • LLMs can, in principle, do everything humans can. And arguably more. "Right now" is how long? People are slow.

      "Provable" essentially means, you have explicit operators acting on explicit states in an exhaustively defined way that preserves "truth", explicitly defined invariants.

      A finite thing you can argue over deterministically.

      Obviously, "you" there is an LLM, the machine your code is run on has to be defined in that very same exacting manner and so on.

      That still isn't enough, you need abstraction, a hierarchy of categories that preserve your intent and accurately describe the problem space.

      "Programming" then is solving an inverse problem over that hierarchy, filling in the blanks sensibly on your way down through the model hierarchy, all the way to atomic instructions your (proven) hardware understands.

      Those layers of proper abstraction is what's largely missing currently. Or rather, is merely vaguely approximated.

      All of which is to say: yes, the current state is a mess. Resolving that is far from easy.

      But you really have no choice, that mess is transparent to large-enough LLMs. Security by obscurity only goes so far.

      11 replies →

  • While I whole-heartedly support the goal of actually bug free software and treating software engineering as a serious engineering discipline, as an experienced software engineer who also studied physics, I have to challenge your base premise about what it means to make engineering explicit.

    Namely:

    > The only way to do that is to make your code provable.

    Proofs are a mathematical concept. They only work in the abstract world of mathematics where everything is perfectly logical.

    Engineering exists in the real world. The physical realm where our mathematics are only imperfect models of what actually exists. Removing bugs through physical engineering requires persistent trial and error until you have found all the places where our mathematical models don't adequately represent the real world.

    It's the same in software engineering, which involves cobbling together a myriad of systems not all designed to talk to each other and massive, ever changing codebases where perfect knowledge is impossible.

    So yes, we should be trying to engineer bug free code. But that's really more a matter of changing our resource allocation, spending more time and money on QA and doing away with mottos like "Move fast and break things". It's a cultural shift and will only come when the bosses -- the venture capitalists who ultimately control our industry -- are held accountable when things break, and given strong incentives to ensure they don't break.

    • > It's a cultural shift and will only come when the bosses -- the venture capitalists who ultimately control our industry -- are held accountable when things break, and given strong incentives to ensure they don't break.

      The problem here is that the correct amount of resources is context-dependent.

      Suppose you're a small business and you're putting up a website to display the menu for your restaurant and directions to get there. Do you want it to get compromised? Of course not. Does it matter very much if it does? Eh. Should you spend $50M in formal verification to make sure it doesn't? Definitely not.

      Whereas if you're developing the software that keeps planes from falling out of the sky, that's an entirely different context.

      The problem comes when someone grabs the awful WordPress junk that was suitable for displaying static menus and wants to use it to process credit cards. But even that isn't really the fault of the awful WordPress junk, it's the fault of the credit card companies for designing their financial technology in such a ridiculous way that Merchant A has to be given a secret that allow purchases to be made against the same card at Merchant B, instead of using the decades-old cryptography that would prevent the customer from ever needing to give anyone a secret that enables that wide a scope of compromise.

      It comes down to how much work is justified to ensure that the thing not have problems, which is not at all the same across different domains.

    • The physical world is actually part of mathematics. Look into John Archibald Wheeler and his "It from bit". In particular, the physical world is finite. Therefore, mathematical proofs very much apply to physics.

      You're right about approximations: we gather data and improve theoretical models in an attempt to exhaust that complexity reality poses.

      You're wrong about exhaustive knowledge about codebases being impossible. LLMs enable exactly that.

      The trick then is to transfer that knowledge in a usable way to what we know about the codebase.

      I agree with the necessary cultural shift.

      2 replies →

  • Engineering is the discipline of designing and implementing solutions that achieve desired outcomes, using limited resources, while satisfying a defined set of constraints and minimum acceptable standards.

    We have way more resources now to achieve way higher standards.

    • As a general rule, building things as an engineering project (according to engineering, whatever you want to call it) doesn't prove they work. Rather, it proves they don't fail in specific known/defined ways. There's always ways they can fail that aren't known/checked, and frequently ways that aren't considered important.

      Kind of like automated tests in software development. Except the people that pay for the engineering stuff are more likely to pay for the extra tests, because of liability.

      1 reply →

    • Engineering is the application of science and mathematics to solve problems and create solutions… that “application of science and mathematics” is what’s been missing from the majority these last 20 years.

    • I don't think so. The article refers to formal verification, but also notes that proof checking should be done by humans. We don't have enough capable humans for that.

  • No software of normal complexity can be "provable". There will always be bugs no matter the strength of the AI.

    • Normal in some cases might be far from what was really needed. Perhaps the two kinds of software can grow further appart?

  • The quote was, "Beware of bugs in the above code; I have only proved it correct, not tried it."

    The quote captured the fact that a human reviewed proof could have mistakes in it. This is very different from a Lean verified proof.

  • > That again is only realistically doable using AI

    The opposite. The amount of bugs that I've seen AI add to software is tremendous, some bugs are things that even a 18 years old that starts working as a developer right after school wouldn't do.

    Also they are unable to fix them, if you ask them to fix a bug they probably introduce 3 other more, and so on, and you arrive quickly at the point that the code is a mess of spaghetti that needs to be rewritten completely (by a human, this time).

    On the opposite side AI is good at finding bugs, so I use it more as an advanced linter that tells me if I'm doing something wrong.

    • You’re describing vibe coding and GP is describing systems for proving correctness.

      If you ask an AI to generate a novel math proof, it will inevitably produce garbage. If you give it the tools to do this (e.g. Lean), evidence is that it can in fact generate meaningful proofs.

      To the extent that we cannot prove software correct, this is probably largely a tooling problem.

      8 replies →

    • What model are you talking about when you say this? "AI" is not one thing, and if you think frontier models are at all comparable to a typical 18yo SWE, you've never actually worked with one of those two.

  • Most bugs are not security issues and most potential security issues aren’t exploitable. So you can have plenty of bugs in your code without getting hacked.

  • > The logical extrapolation of AI capabilities stress-testing human software is all bugs being discoverable. Hence, you have to aim for actually bug-free software.

    > The only way to do that is to make your code provable. That again is only realistically doable using AI.

    If you're code is "provable" doesn't that only mean you've proved the code meets its specification? The specification can still have bugs.

    • You are describing the difference between Verification (Does this do what we explicitly said it would do?) and Validation (Does this do what we wanted to achieve?). One is about compliance of design promises, and the other covers the issue that the various levels of design documents might have failed to completely capture intent.

    • Yes, that's where the "engineering" part comes in.

      Engineering builds models that approximate the real world under practical considerations. You e.g. have to weigh costs vs risks and apply good judgement.

      In essence, you try to achieve the best possible with the resources you've got.

  • How do you prove the correctness of your theorem prover?

    • Depends which way you mean. It is possible to provide a formal specification for a proof verification engine and prove, in the same language that the engine is for, that the engine implements that specification.

      Proving that the system it implements is like, logically sound, is a different issue, and for that you do need stronger axioms.

  • Just like we make bridges and buildings “provable”?

    • In an important way bridges and buildings are indeed proven to be sound by applying the mathematical tools of structural engineering, materials science, etc. Software Engineering also has analogous formal tools at its disposal (Lean is one gaining a lot of exposure these days), but many were being neglected because it wasn't worth the bother. In this new adversarial world, we'll be forced to reach for them more often. Luckily the models are also a big help in making these tools more approachable.

    • People aren't using AI to relentlessly attack bridges and buildings with adversarial earthquakes from the other side of the country.

      But also I would bet those undergo more rigorous testing than a lot of software.

      3 replies →

  • >> The only way to do that is to make your code provable.

    Extreme naivety alarm... Explain how code provable allows for bug free software. Would love to understand the intellectual jump there.

  • If mathematics serves as a example, the tools were there, but so tedious and unenjoyable to use it took AI to actually make their usage a reality.

    Clanker doesn't care it's boring or too much work. Clanker just grinds 24/7.

> It’s frustrating to have all these 0days and CVEs to patch for now, but in the long run perhaps we’ll leave with more robust software.

I'm skeptical; every line of code is a liability. Humans regularly make the trade-off between adding lines of code vs doing without the incremental feature addition. LLMs don't; everything gets added.

The recent brotli attack should have been a wakeup call - few people use it, no one actually needs it, but the exploit that it carried was present on every system. Everything from IIS to Caddy and in-between, and yet no one was actually using the thing.

It's a liability to add code, whether you're duplicating existing code in the codebase or adding a feature 1% will use.

  • > LLMs don't; everything gets added.

    LLMs can run with whatever directive you give them. If the directive is lots of code that's what you get. But when everyone gets repeatedly burned by vulnerabilities the directive becomes building bullet-proof code. With the right prompting an LLM can be a lot more diligent about that than we ever could.

    • This is like saying humans just shouldn't gamble or drink or have sex with the wrong people.

      It might be true but it's also a pointless statement that doesn't impact the problem, because it won't happen. And "it won't happen" isn't some unsupported prediction that no one can say. The aggregate behaviour of humans is a known thing, and it's not productive to the actual problem to pretend otherwise. It's only productive an individual looking for an easy excuse to avoid dealing with the problem.

      1 reply →

  • > LLMs don't; everything gets added.

    By default, yes. But you don't have to let them, and enforcing some code quality was shown to use significantly fewer tokens (can't find the link now).

As a testing tool, yes, post AI software is going to be more robust in the face of attack. We saw this when Metasploit became a thing, it provided an easy way for web site owners to test their stack against 'known problems.' I think that as a rule, we won't get a lot of action on this until we change the laws around incidental damages liability with regards to software.

It is also unfortunate than in more than half the cases where AI provides a 'fix' that fix breaks something else, so my guess is this is going to be 90% human labor to correct, at least initially.

It's interesting that no-one talks about writing new systems and base languages that don't inherit anything from the current toolchain. That's the first step, then new architectures / fully open auditable hardware basis. With html you don't need any of this dependency chain. As long as you can write a browser you can be running on anything underneath.

  • While it's hard to point to a fully top bottom initiative to create new platforms from the ground up, the Chinese appeared to be making an effort to reduce their non-native surfaces with things like Harmony OS.

    A complete plan to reduce vulnerability from untoward influences is more feasible now with agent assisted engineering. You have to be carefully selective about what matters and what doesn't, or the cost and time balloon out of control.

    • That's also weird, in this reality, isn't it? You've got russians, chinese, etc, supposedly antagonistic to the western cultural hegemony, but then they just rely on western technology tool-chains. If I was guiding any of these countries a close to number 1 priority, technologically speaking, would be to create a completely independent software tool-chain. And talk through adaptors.

      2 replies →

  • At this point, a browser is a significant part of the way to being an OS virtualised inside the OS it's really running on. Complete with occasional leaks through the virtualisation to the real host OS/machine.

    • Yes, chrome for instance is more lines of code than the entirety of Linux, I think this just makes the case stronger for what I said. Although I understand why it might be so.

  • What do you mean with "don't inherit anything"? Using the existing binary ABI is mandatory for interoperability so yes, in that sense every new programming language inherits something. Other than that, there's plenty of languages that have fully self-contained toolchains and runtimes, e.g. Erlang and Rust come to mind. Guix bootstraps its entire environment from a minimal Lisp implementation. There's also Microsoft's CLR and its entire ecosystem of programming languages, but I don't know if the runtime exists next to the Win64 C/C++ base or on top of it.

    HTML is entirely the wrong comparison as it's a document format and not a programming language, and "as long as you can write a browser" is not a simple condition. Do we have any browser (even in development) that isn't written with current toolchains? Or a headless javascript runtime perhaps?

    • HTML as the "transport"/"dialect" to keep compatibility with the existing computational world. What I mean is from the ground up, no C, no erlang (which Im a big fan of in terms of application organisation), no Rust, no Javascript. Start from first principles, OS'es closer to uni-kernels, sane sharing/privacy policies, ability for instance to start an "executable" (already an abstraction tied to the current mode of software production, albeit a perhaps useful one) with a narrow set of scoped access. Then it only has to implement a browser/subset of it to parse HTML and it can "access" most of the relevant parts of the existing software world (internet). Ditch anything complex, if necessary make a browser that just uses flexbox, no other things, no backwards, compatibility, if you need compatibility buy a normal laptop with a normal OS, that comes with all the cruft, but design this new one from the ground up.

      But I also don't understand why (without compatibility layers) a browser should be as complex, or remotely as complex, as currently, specially with all the knowledge in hindsight.

      I'm not saying this is easy, doable, or whatever, but that was what I meant.

We will leave with more robust software if there are people understanding how this software can be build. Don't forget that the industry as whole stopped hiring new people who wants to enter this field, also skill degradation is a real thing.

It would be the opposite. While old backdoors will be patched (if easier ones are not switched off or upgraded already), new far more sophisticated ones will be added with AI that only few states will have.

  • Shannon's entropy theory disagrees. No matter how good the best AI is, its ability to hide a backdoor is limited by the information density within the programming language, and the complexity of possible backdoors will plateau, allowing much lesser AIs to discover them. Consider that binary software is just a more dense form of code, too. A much less dense form, Javascript, makes finding backdoors easy because they all have to use obfuscation via base64 or something to avoid static analysis, which itself immediately draws suspicion.

I would be shocked if there isn't a big team of people at the NSA/GCHQ, etc, right now monitoring all the advanced-LLM discovered holes in commonly used software that they might have already been using for 10 or 15 years without anyone knowing about it. And writing daily reports basically saying "cross this one off the list, it's getting patched by debian, RHEL, etc".

Hopefully we'll also see us back to KISS principles too. But who am I kidding

  • What I have heard from AI it is anything but KISS... More features and more code as fast as machinelly possible.

    • It doesn't have to be that way. You can use llms to greatly improve the quality of the code. You do this by focusing on one part of the design use the LLM to explore alternatives, use it to poke holes in what you have. I think the engineering cultures that embrace this way of using AI will far outperform everyone else in the long term.

      12 replies →

    • People complain about LLMs not respecting KISS, but fail to address why = LLMs being defensive and coding for situations that either do not happen or are unlikely to happen. That doesn't absolve you from deciding using your human brain if given change makes sense or doesn't. You can also tell LLMs to not program defensively.

      Same with any other acronyms - if you don't set up guardrails on when given principle should apply you'll get code that you can only complain about.

      18 replies →

    • Depends on your incentives, most people and companies are measuring Lines of codes and features as the metric so ofc it will increase it, but AI can create small KISS applications. It might have a little difficulties in doing so sometimes because it sometimes likes to overengineer things but I have to wonder how much of it is because it is RLHF'd to solve questions at any costs in terms of lines of code rather than training it in solving it in KISS principles. Also I wonder how AI will perform if we explicitly treat KISS as the only principle and have checks running on it and have it discard all the code which wouldn't follow KISS principle if it doesn't follow the principle.

      2 replies →

  • Yeah, so far coding agents haven't been good at reducing entropy at a large scale. That's the area where we need to push hardest in my opinion. Writing code is cheap now, but that makes it easier than ever to inflate codebases to millions of lines of unnecessary complexity that are impossible to work with and maintain. I want to see an LLM reduce a complex multi-million line codebase to 1/10th of its size or less without breaking functionality. That would be impressive!

    • > but that makes it easier than ever to inflate codebases to millions of lines of unnecessary complexity that are impossible to work with and maintain.

      Impossible for you, me, and other humans maybe. But not hard to understand for LLMs

      > I want to see an LLM reduce a complex multi-million line codebase to 1/10th of its size or less without breaking functionality. That would be impressive!

      They can and do, if you ask them to.

      If you have tests to validate functionality, it can easily reduce and refactory.

      But, why are we caring about LOC again?

  • Well, with fewer architecture astronauts overdoing things, all those extra abstractions and dimensions of extensibility that never get used never get written, so one might hope the code is simpler in the long run. But right now coding agents just love writing code, and they don't have a lot of taste for boundaries and architecture, so we have the loop-unrolled, big-pile-of-ifs kind of logic that isn't good.

  • I may be ignorant, but what do you mean with this and why is it upvoted so much?

    To me KISS is basically about how you’d write the code, the architecture, which is something that - at least currently - humans need to oversee when writing new code with LLMs.

    But what does it have to do with AI discovering a ton of bugs in a lot of (open-source) software?

    • that people will finally start solving issues by simplifying the software rather than generating even more edge cases.

    • A lot of these bugs are in rarely exercised code paths that probably shouldn't have been written into the software in the first place.

    • KISS usually leads to less surface area.

      Someone not following KISS, might install Windows Server + tons of bloated applications, in order to serve a .asp server, which serves JSON that never changes, or something similarly stupid.

      Meanwhile, the KISS developer would put static .json files on a CDN or self-hosted Varnish or whatever, and call it a day.

      The first opened up a whole can of potential venues for exploitation, while the second might only have opened up one potential venue for exploitation.

    • Software that does less is easier to understand and reason about, and typically requires less code. Less opportunity for bugs to appear.

      Maybe, when they build a pomodoro timer, people will consider the possibility that the entirety of a browser engine as well as 30 000 javascript dependencies from random unvetted sources introduces unnecessary complexity and a practically infinitely fractal attack surface.

  • Plain http 1.0 is KISS. Does not really work that well.

    • Systems should be made as simple as possible, and no simpler.

      That doesn't mean every simple system solves the problems we intend for it to solve. It means that all else being equal, we should prefer parsimony.

I was thinking that intelligence agencies and "security" companies like Celebrite must be worried. If eventually all vulnerabilities are patched there will not be any avenue for them to gain access to adversaries' computers.

I predicted long ago that when computers become totally secure intelligence and LEA will lobby for mandatory backdoors, possibly through secret courts.

more likely the bugs will shift complexity. this has happened before, but slower. then that added complexity will make the new backdoors and 0days even more expensive again.

in the beginning, ppl didnt know a lot, and default passwords and stack overflows were 0days.

then awareness came and a lot of that is actually fixed. Writing a modern exploit more often now requires many stages and a shit ton of skills and knowledge.

that will increase.

nothing will be 'fixed' in that utopian sense.

I'm more annoyed by the fact the fixes and exploits themselves are being artificially delayed in misguided attempts to coordinate disclosure, in world where anyone can just point AI at vague direction of the bug and just find it

  • Right, it entertaining to me to prompt an LLM with a build error or a runtime dependency error and it will literally start reverse engineering things before even attempting to look at docs.

This is the real reason for the vulnpocalypse, not "technical debt".

NSA spent 20 years stockpiling vulns and pushing the industry towards half-assed solutions like address sanitization and pointer tagging when they could have put the industry on memory-safe languages instead.

They managed to get the IME/PSP/TrustZone into 99% of the CPUs out there by mandating it for government purchases; they could have done the same thing with memory-safe languages. But instead they chose to stockpile vulns. Hope they burn in hell for this.

  • Why do you think the NSA could have put the industry on memory-safe languages?

    Even if they wanted to, I highly doubt they could push the industry to do that. The industry does what it wants to do, and rewriting tons of software was far from its priorities. There were no LLMs back then to help with such a massive migration.

    There's also the fact that rewriting software tends to introduce a lot of new bugs.

    • The U.S. government could have required all new software for any government-procured system to be written memory-safe languages, thus making it ubiquitous. This could have been phased in slowly with a few years of on-ramp time to allow for industry to acquire the relevant skills.

      9 replies →

    • Why do you think the NSA could have put the industry on memory-safe languages?

      Did you even read my comment? I very explicitly answered this.

      Government purchasing requirements have an immense effect on industry. IME/PSP/TrustZone have 99% CPU coverage because NSA put "owner-inaccessible oversight processor with disjoint physical address space" into federal sourcing requirements.

      They could easily have done the same with "memory-safe language". Note this is not the same as "must use Ada" which is obviously dumb. The IME/PSP/TrustZone req worked so well because they specified the feature not the implementation (and indeed it has been implemented three different ways).

      But instead, NSA actively pushed in the opposite direction and funded all sorts of kludges to try to keep memory-unsafe languages kicking as long as possible.

      They have actively sabotaged the national security of their own country.

  • >IME/PSP/TrustZone into 99% of the CPUs

    Yeah, about that. Its the biggest vulnerability in the industry. Nobody wants to confront this fact, though.

    Too much profit to be made in subversion and human rights abuses.

    • Sometime the profit made by the companies for inserting backdoors can be quantified:

      " In 2013, The New York Times reported that documents in their possession but never released to the public "appear to confirm" that the backdoor was real, and had been deliberately inserted by the NSA as part of its Bullrun decryption program. In December 2013, a Reuters news article alleged that in 2004, before NIST standardized Dual_EC_DRBG, NSA paid RSA Security $10 million in a secret deal to use Dual_EC_DRBG as the default in the RSA BSAFE cryptography library, which resulted in RSA Security becoming the most important distributor of the insecure algorithm. "

      https://en.wikipedia.org/wiki/Dual_EC_DRBG

      1 reply →