News for hackers. Stuff that matters.
Re:Stranger Strings: An exploitable flaw in SQLite by gregors on Tuesday October 25, 2022 @09:27AM (#33330179)
Great work!!!

"SQLite is extensively tested with 100% branch test coverage. We discovered this vulnerability despite the tests, which raises the question: how did the tests miss it?"

Tests only validate known behavior. They didn't have a test that exercised a large string. I don't know how their test suite works but I'm curious if quickcheck might have possibly found this or if the 32-bit viewpoint of the programmer at the time would have also limited possible generated values?

Re:Stranger Strings: An exploitable flaw in SQLite by capableweb on Tuesday October 25, 2022 @09:39AM (#33330305)
Unsure if Property Testing would actually have found this issue, 2 billion bytes is a very large string and usually you wouldn't put the limit so high, the tests would run for too long.

Fuzzing would be a more appropriate measure to have found this issue, as usually you do fuzzing with no limit of length/size, as that's the entire point of fuzzing to expand the scope of what you're testing.

Regarding test coverage, I'd argue that even caring about test coverage is giving people a false sense of security. It's easy to achieve 100% test coverage, but that doesn't actually say that you're testing the right/wrong thing, just that at one point that line of code was executed, but again, that says nothing about correctness.

Re:Stranger Strings: An exploitable flaw in SQLite by ajross on Tuesday October 25, 2022 @09:53AM (#33330472)
Yeah, exactly. People tend to misunderstand fuzzing, and think of it as "feeding random garbage at an API". Fuzzing, done with proper tooling, is automated coverage testing. You have a bounds overflow that depends on input data but only if condition A and B and C are true in the runtime state? Fuzzing will find it, almost always, by detecting the branching behavior of your code.

So all the replies here saying "the tests didn't find it because they didn't cover the case" are missing the point. There are test paradigms that don't rely on humans to enumerate cases.

Re:Stranger Strings: An exploitable flaw in SQLite by shagie on Tuesday October 25, 2022 @10:01AM (#33330569)
> Fuzzing would be a more appropriate measure to have found this issue

SQLite has some fairly extensive fuzzing. https://www.sqlite.org/testing.html#fuzz_testing

One of the sections on Fuzz testing:

> 4.3 Boundary Value Tests

> SQLite defines certain limits on its operation, such as the maximum number of columns in a table, the maximum length of an SQL statement, or the maximum value of an integer. The TCL and TH3 test suites both contains numerous tests that push SQLite right to the edge of its defined limits and verify that it performs correctly for all allowed values. Additional tests go beyond the defined limits and verify that SQLite correctly returns errors. The source code contains testcase macros to verify that both sides of each boundary have been tested.

Re:Stranger Strings: An exploitable flaw in SQLite by chasil on Tuesday October 25, 2022 @10:20AM (#33330795)
It sounds from the article that "-fstack-protector-all" might remove everything except the denial of service.

"...arbitrary code execution is confirmed when the library is compiled without stack canaries, but unconfirmed when stack canaries are present, and denial-of-service is confirmed in all cases."

Everything should be compiled with all available compiler defenses:

https://manpages.debian.org/testing/devscripts/hardening-che...

Re:Stranger Strings: An exploitable flaw in SQLite by chasil on Tuesday October 25, 2022 @02:41PM (#33334556)
It does appear safe with the OS package on CentOS 7.

  $ hardening-check /usr/lib64/libsqlite3.so.0.8.6
  /usr/lib64/libsqlite3.so.0.8.6:
   Position Independent Executable: no, regular shared library (ignored)
   Stack protected: yes
   Fortify Source functions: yes (some protected functions found)
   Read-only relocations: yes
   Immediate binding: no, not found!
Re:Stranger Strings: An exploitable flaw in SQLite by marcosdumay on Tuesday October 25, 2022 @10:07AM (#33330631)
> Unsure if Property Testing would actually have found this issue, 2 billion bytes is a very large string and usually you wouldn't put the limit so high, the tests would run for too long.

Yet, this is a textbook case of issues caught by static analysis.

Re:Stranger Strings: An exploitable flaw in SQLite by adrianN on Tuesday October 25, 2022 @10:37AM (#33331021)
It is absolutely not easy to achieve the kind of coverage that sqlite has. You need massive amounts of tests for that. Of course coverage is not sufficient, you can exercise code without checking any properties at all. But to say that it gives a false sense of security is too harsh.
Re:Stranger Strings: An exploitable flaw in SQLite by capableweb on Tuesday October 25, 2022 @10:52AM (#33331273)
> It is absolutely not easy to achieve the kind of coverage that sqlite has.

It is though. Give me one project and I'll send you a test suite that "tests" 100% of executable lines. It won't have any actual assertions, but that's not what code coverage is about anyways, so hopefully you won't mind.

Number of assertions per line of code is about as good metric for how well tested something is as code coverage, which means just about nil.

Re:Stranger Strings: An exploitable flaw in SQLite by chasil on Tuesday October 25, 2022 @11:23AM (#33331832)
Compliance with the DO-178B standard was not easy for the SQLite maintainers. It required several years to achieve.

By adhering to the DO-178B standard, the testing is confirmed extensive and satisfies requirements for use in avionics.

"Rockwell Collins... introduced me to this concept of DO-178B. It’s a quality standard for safety-critical aviation products, and unlike so many quality standards, this one’s actually readable... one of the key things that they push is, they want 100% MCDC test coverage.

"Your tests have to cause each branch operation in the resulting binary code to be taken and to fall through at least once.

"At the machine code level... actually, MCDC’s a little stricter than that. Let’s not dwell on the details, but I had this idea, I’m going to write tests to bring SQLite up to the quality of 100% MCDC, and that took a year of 60 hour weeks. That was hard, hard work. I was putting in 12 hour days every single day. I was just getting so tired of this because with this sort of thing, it’s the old joke of, you get 95% of the functionality with the first 95% of your budget, and the last 5% on the second 95% of your budget. It’s kind of the same thing. It’s pretty easy to get up to 90 or 95% test coverage. Getting that last 5% is really, really hard and it took about a year for me to get there, but once we got to that point, we stopped getting bug reports from Android."

https://corecursive.com/066-sqlite-with-richard-hipp/

Indeed, SQLite is used for flight systems on the Airbus A350. No other major database vendor is certified to do so.

https://www.sqlite.org/famous.html

Re:Stranger Strings: An exploitable flaw in SQLite by Someone on Tuesday October 25, 2022 @11:08AM (#33331594)
> Give me one project and I'll send you a test suite that "tests" 100% of executable lines.

I don’t think you can do that with every project. For example, a function f may do:

  if (p == null) {
    abort();
  }
If all callers also do that test, there’s no way to hit that abort() line in the program. Your test suite may not be able to hit it either. Maybe f is a private function, or that test occurs on one of its intermediate values, or f accidentally has two identical tests:

  if (p == null) {
    abort(“p is null”);
  }
  if (p == null) { // copy-paste bug
    abort(“q is null”);
  }
  if (r == null) {
    abort(“r is null”);
  }
Even if it is possible to hit that line, finding a path through the code that passes in a null value can be extremely hard.

As a simple contrived counterexample, try getting 100% coverage on a function that does if(secure_hash(foo) == 0) bar();

Re:Stranger Strings: An exploitable flaw in SQLite by phoe-krk on Tuesday October 25, 2022 @11:35AM (#33332006)
> Your test suite may not be able to hit it either.

Minor nitpick, process terminations are unit-testable in general; see e.g. https://github.com/google/googletest/blob/main/docs/advanced...

Re:Stranger Strings: An exploitable flaw in SQLite by garaetjjte on Tuesday October 25, 2022 @12:26PM (#33332749)
They don't count assertions in testing coverage: https://www.sqlite.org/testing.html#coverage_testing_of_defe...
Re:Stranger Strings: An exploitable flaw in SQLite by jonhohle on Tuesday October 25, 2022 @12:32PM (#33332840)
What is fair in testing and what is being tested? If I can stub `secure_hash` and `bar`, that’s a pretty easy test to write. Assuming the symbols are visible at test time, stubbing those is relatively straight forward in C, Java, Bash, and Ruby, JavaScript, etc.

Even in the above examples, a linter should point out that the second `p == null` is inaccessible. I’m very pro test coverage, but static analysis shouldn’t be thrown out just because unit tests are available.

Re:Stranger Strings: An exploitable flaw in SQLite by adrianN on Tuesday October 25, 2022 @11:20AM (#33331784)
How much do you charge? Because adding assertions to tests that give MC/DC coverage is a lot cheaper than writing them. I know a couple of big companies who might be interested.
Re:Stranger Strings: An exploitable flaw in SQLite by pfdietz on Tuesday October 25, 2022 @10:53AM (#33331284)
Coverage testing is just a special case of a more general concept: mutation testing (where the mutation is "if you reach this line/branch, blow up.")

Perhaps mutation testing could have revealed the test suite was lacking in a test detecting that bug (for example, a mutation that changed a type from unsigned to signed or vice versa.)

Re:Stranger Strings: An exploitable flaw in SQLite by Quekid5 on Tuesday October 25, 2022 @02:00PM (#33334054)
I'm so sad that so few test frameworks/libraries offer mutation testing. (And its profiling cousin Causal Profiling.)

Admittedly the some languages might make them very hard to do, but the payoff would be so, so sweet.

Re:Stranger Strings: An exploitable flaw in SQLite by taeric on Tuesday October 25, 2022 @04:44PM (#33335911)
My team at work took it out of our product. :( I couldn't make strong arguments that it was providing value, as it had turned into the slow test that always passed, by the time new folks joined. I do think it has a lot of merit, though.
Re:Stranger Strings: An exploitable flaw in SQLite by pfdietz on Tuesday October 25, 2022 @10:32PM (#33339067)
To be clear... mutation testing is a way to assess the power of a test suite, not a way to test software itself (in this it is analogous to using statement/branch coverage to assess a test suite). Do you mean the tests added to achieve high mutation coverage were not worth the time it took to run them? The mutation process itself is not something that would be part of CI. Doing all that mutation and generating the tests to kill non-equivalent mutants is very time consuming, I will admit.
Re:Stranger Strings: An exploitable flaw in SQLite by taeric on Tuesday October 25, 2022 @11:01PM (#33339300)
On the code base in question, the full but with mutation tests was only 8 minutes. Not snappy, but hardly a disaster.
Re:Stranger Strings: An exploitable flaw in SQLite by pfdietz on Wednesday October 26, 2022 @01:23AM (#33340120)
I'm guessing these tests were run constantly, in CI, not periodically (say, daily, or even weekly, or before release). SQLite has tests that take many hours that must pass before release.

There are testing modes that are worth doing, and I think should be part of a development process, but shouldn't be run at every check-in. Long soaks of random input property-based testing is like this, for example.

Re:Stranger Strings: An exploitable flaw in SQLite by taeric on Wednesday October 26, 2022 @10:40AM (#33344421)
We run a lot of tests constantly. So, yeah. That said, as soon as it is in the release pipeline, I really encourage the team to not directly watch it. If we don't trust our tests to allow a change to go out, we need to fix the tests. Not train members to watch the deployment.
Re:Stranger Strings: An exploitable flaw in SQLite by pfdietz on Wednesday October 26, 2022 @01:20PM (#33346702)
It's not a matter of watching a deployment, it's a matter of having separate testing modes used in appropriate ways. Rapid tests should catch most bugs in CI, but more laborious tests could catch other bugs that would escape CI.

Personally, there's a free software effort where my contribution is running tens of millions of randomized property-based tests each day and registering bugs when failures occur. This supplements and complements the fast tests that all must pass before changes are merged to master.

Re:Stranger Strings: An exploitable flaw in SQLite by taeric on Wednesday October 26, 2022 @08:13PM (#33351373)
Apologies, I meant my point to be tangential. I agree with your general point. Our deployment pipelines go from build to prod though. With a general cadence on my current team of less than an hour. 6ish minutes to that is not a concern.

Even when I was on teams where the general cadence of getting changes out all the way to prod was on the order of a week, we still had changes getting to our beta environments in less than an hour. And that was on a team that wanted mutation testing, so we had it.

Edit: So my point was team mates that were worried about the 6 minutes added by mutation testing there, were the ones that would commit and then constantly refresh the page so that they could "approve" a change as it goes out. I pushed for all approvals to be automated, so there was nothing for them to watch.

Re:Stranger Strings: An exploitable flaw in SQLite by admax88qqq on Tuesday October 25, 2022 @11:21AM (#33331811)
Boundary Value tests are standard practice when doing extensive testing.

Bugs rarely occur for typical input values but more often occur at the "boundaries" or limits of the input domain.

That being said I don't really fault SQlites testing here.

The key takeaway for me is that even with exhaustive testing you can still have security issues like this, so perhaps what is needed is a language or methodology change.

If SQLite, a quality codebase with exhaustive tests, can have memory vulnerabilities, maybe we need to leave C behind.

Re:Stranger Strings: An exploitable flaw in SQLite by ghoward on Tuesday October 25, 2022 @11:24AM (#33331841)
SQLite is used in places that Rust has no compiler for and that no other language has a compiler for.

One severe CVE in about 20 years is no reason to rewrite in another language and remove support for some platforms.

Re:Stranger Strings: An exploitable flaw in SQLite by nicoburns on Tuesday October 25, 2022 @11:48AM (#33332197)
In the long term, I hope C stops being the default language that hardware vendors provide for their hardware.
Re:Stranger Strings: An exploitable flaw in SQLite by ghoward on Tuesday October 25, 2022 @11:50AM (#33332222)
Me too, but I also hope Rust is not that default language.
Re:Stranger Strings: An exploitable flaw in SQLite by threatofrain on Tuesday October 25, 2022 @01:08PM (#33333345)
Just how many machines are we talking about? Does anyone have estimates?
Re:Stranger Strings: An exploitable flaw in SQLite by ghoward on Tuesday October 25, 2022 @01:36PM (#33333705)
Probably every Airbus A350 XWB and a lot of GM, Nissan, and Suzuki cars. Maybe also a few or a lot of General Electric products. [1]

The Library of Congress also recommends it for preservation of digital content, which would be harder if Rust compilers were lost. If all C89 compilers were lost, it would be much more simple to create a new one to compile SQLite than it would be to recreate a Rust compiler.

[1]: https://www.sqlite.org/famous.html

Re:Stranger Strings: An exploitable flaw in SQLite by admax88qqq on Thursday October 27, 2022 @01:48PM (#33361276)
I'm not saying we need to rewrite SQLite and I'm not sure why everyone is assuming I suggested rust.

But people need to consider how much testing SQLite did and still hit memory vulnerabilities when they consider picking up C for a new project.

Re:Stranger Strings: An exploitable flaw in SQLite by chasil on Tuesday October 25, 2022 @01:01PM (#33333239)
Your problem is that you need to replicate the DO-178B certification in Rust:

"I’m going to write tests to bring SQLite up to the quality of 100% MCDC, and that took a year of 60 hour weeks. That was hard, hard work."

Whatever comes out of Rust will be much worse until compliance is achieved. That's going to take substantial time.

Re:Stranger Strings: An exploitable flaw in SQLite by jonhohle on Tuesday October 25, 2022 @12:38PM (#33332938)
> It's easy to achieve 100% test coverage

If code hasn’t been written to be testable, 100% coverage is not _easy_, by any stretch. Any legacy code base written without unit tests that I’ve come across required significant refactoring to get any basic assertions I place, let alone any reasonable coverage.

I also think there is some value in high coverage, even without assertions. At a minimum it’s a guarantee that code has been run before production/distribution. That’s probably a lot more than can be said about a lot of code.

Re:Stranger Strings: An exploitable flaw in SQLite by RHSeeger on Tuesday October 25, 2022 @09:35AM (#33330266)
Indeed. Tests do not tell you code is correct. They only tell you a list of ways it is not incorrect.
Re:Stranger Strings: An exploitable flaw in SQLite by aa-jv on Tuesday October 25, 2022 @09:38AM (#33330290)
.. and combined with coverage they also tell you what you are yet to test properly.
Re:Stranger Strings: An exploitable flaw in SQLite by fulafel on Tuesday October 25, 2022 @09:40AM (#33330318)
s/properly//
Re:Stranger Strings: An exploitable flaw in SQLite by kevincox on Tuesday October 25, 2022 @09:58AM (#33330525)
Actually: It tells you some things that are not tested properly.

Just because something has coverage doesn't mean that it is tested properly as evidenced by this bug even though sqlite has 100% branch coverage.

Re:Stranger Strings: An exploitable flaw in SQLite by Macha on Tuesday October 25, 2022 @10:34AM (#33330990)
Yeah, coverage (or rather 100% - coverage) is basically a lower bound on what's not tested.
Re:Stranger Strings: An exploitable flaw in SQLite by masklinn on Tuesday October 25, 2022 @10:51AM (#33331257)
Even "coverage" is not enough, what 100% coverage? Lines? Branches? Paths?
Re:Stranger Strings: An exploitable flaw in SQLite by Macha on Tuesday October 25, 2022 @01:40PM (#33333764)
That's my point, coverage (whatever your chosen metric) can only prove the absence of tests, not their presence
Re:Stranger Strings: An exploitable flaw in SQLite by PathOfEclipse on Tuesday October 25, 2022 @12:01PM (#33332408)
I think this thinking is short-sighted. Tests increase your confidence that code is correct, and they are much cheaper to do that formal verification, which itself still requires a leap of faith that there is no bug in the formal verification system, its implementation in the compiler toolchain, or the assumptions made about the underlying hardware.

You can cast doubt on anything. Will you be alive 30 seconds from now? You don't know for sure! But you can be pretty confident. Similarly, testing can increase confidence in code correctness. SQLite has an excellent security history overall, and it's testing strategy is part of the reason for that success.

Re:Stranger Strings: An exploitable flaw in SQLite by pclmulqdq on Tuesday October 25, 2022 @01:13PM (#33333394)
Formal verification also becomes practically impossible at a certain level of complexity.

SQLite is better tested than many silicon chips, so it's hard to fault their testing strategy.

Perhaps a few static analyzers should be run on the codebase to find possible bugs like this.

Re:Stranger Strings: An exploitable flaw in SQLite by hulitu on Tuesday October 25, 2022 @04:04PM (#33335454)
> Formal verification also becomes practically impossible at a certain level of complexity.

Then reduce complexity.

Re:Stranger Strings: An exploitable flaw in SQLite by function_seven on Tuesday October 25, 2022 @04:34PM (#33335777)
You can make things as simple as possible, but no simpler than that.

SQLite is a complex program, inherently. It's designed to allow users to do complex things, and as such cannot be simpler than its purpose allows.

I'm no formal verification expert—so I don't know if SQLite is above or below that fuzzy threshold—but "reduce complexity" is not always an available tool.

Re:Stranger Strings: An exploitable flaw in SQLite by nottorp on Tuesday October 25, 2022 @04:21PM (#33335627)
Well, int main (void) { return 1; } is most likely bug free. But it's not useful (except as /bin/true).
Re:Stranger Strings: An exploitable flaw in SQLite by jwilk on Tuesday October 25, 2022 @06:04PM (#33336743)
That would be a very buggy /bin/true implementation.
Re:Stranger Strings: An exploitable flaw in SQLite by nottorp on Wednesday October 26, 2022 @05:09AM (#33341350)
Right, but a correct /bin/false :)
Re:Stranger Strings: An exploitable flaw in SQLite by hulitu on Tuesday October 25, 2022 @03:39PM (#33335177)
> Tests increase your confidence that code is correct, and they are much cheaper to do that formal verification,

Your confidence as SW engineer. The purpose of a test is to look for unexpected behaviour, not for expected behaviour.

Re:Stranger Strings: An exploitable flaw in SQLite by RHSeeger on Wednesday October 26, 2022 @01:21PM (#33346709)
And to be specific, they generally look for _known_ unexpected behavior; in that you need to have a test for it.

Though clearly there's still unknowns, like when you're throwing random data at an api to see if you can find bugs. But even still, you know what _ways_ you're doing that. Tests generally won't turn up things nobody has thought to test.

Re:Stranger Strings: An exploitable flaw in SQLite by XCSme on Tuesday October 25, 2022 @10:40AM (#33331067)
Proving that a code always works means that there doesn't exist any case in which it breaks. You can't really prove something doesn't exist, unless the input domain is of fixed size and you can test all of it. In self-hosted technology, it is even trickier to prove something won't break, as there is so much potential variation in the hardware/software that your program runs on. There might even be stupid edge-cases, like the program failing only when the device it runs on is upside-down, or placed at high altitude, etc.
Re:Stranger Strings: An exploitable flaw in SQLite by naikrovek on Tuesday October 25, 2022 @10:49AM (#33331212)
Is this what "formal verification" is? That seems very hard for software that accepts arbitrary input.

I understand formal verification, a bit, in terms of FPGA design, but not software.

Re:Stranger Strings: An exploitable flaw in SQLite by rowanG077 on Wednesday October 26, 2022 @10:08AM (#33343920)
You can prove things even if then input domain has infinite size. For example n < n + 1 is always true. It's trivial to prove this. Yet the n can have infinite different values.
Re:Stranger Strings: An exploitable flaw in SQLite by XCSme on Wednesday October 26, 2022 @01:37PM (#33346883)
True.

Just one note, there are still edge cases, if n overflows the data type, you would have n > n + 1

Re:Stranger Strings: An exploitable flaw in SQLite by rowanG077 on Wednesday October 26, 2022 @02:58PM (#33347844)
Very pedantic but: In that case the size of the domain of n is not infite.
Re:Stranger Strings: An exploitable flaw in SQLite by mrcus on Tuesday October 25, 2022 @12:48PM (#33333082)
“Program testing can be used to show the presence of bugs, but never to show their absence!”
Re:Stranger Strings: An exploitable flaw in SQLite by perlgeek on Tuesday October 25, 2022 @12:52PM (#33333127)
> how did the tests miss it?

I'll offer another explanation: branch coverage != path coverage

You generally cannot cover every possible code path through a program, because even for n branches, the possible paths scale as 2^n, and for loops it's even worse.

Once you have 100% branch/statement coverage in your tests, all bugs that are left are those that arise from the interaction of two or more statements, in a way that wasn't covered in the tests.

Re:Stranger Strings: An exploitable flaw in SQLite by insanitybit on Tuesday October 25, 2022 @01:37PM (#33333720)
https://www.sqlite.org/testing.html#mcdc

This is what sqlite means by "branch" coverage, it is in fact a bit stricter.

You can see in this document how significant the sqlite testing is, the 100% MC/DC is just one component.

Re:Stranger Strings: An exploitable flaw in SQLite by taeric on Tuesday October 25, 2022 @04:42PM (#33335878)
I don't think that tracks. Consider:

    if (a) {
       doA();
    }
    if (b) {
       doB();
    }
With (a,b) as (true, false) and (false, true), you satisfy every outcome of each decision test, but you never tested "doA()" and "doB()" at the same time.

I think there is some interpretation of that last bullet, "Each condition in a decision is shown to independently affect the outcome of the decision" that is inline with the idea. But that sounds more like on an statement like:

    if (a && b)
that you test changing the values of a and b independently to show that either one of them can cause the check to pass.
Re:Stranger Strings: An exploitable flaw in SQLite by insanitybit on Tuesday October 25, 2022 @04:45PM (#33335926)
By "this" I meant what I linked, not "what you just said". I realize in retrospect that I was unclear. I'm not sure if their approach would imply satisfying the (true, true)/ (false, false) case given that they are separate branches.
Re:Stranger Strings: An exploitable flaw in SQLite by taeric on Tuesday October 25, 2022 @04:48PM (#33335961)
Right, but I think that is what the original poster meant. There is a "path" through my example that hits both "doA()" and "doB()." And having 100% branch coverage doesn't necessarily get you there. Even under the stricter rule that they are using.
Re:Stranger Strings: An exploitable flaw in SQLite by insanitybit on Tuesday October 25, 2022 @04:49PM (#33335977)
Yep, we're on the same page.
Re:Stranger Strings: An exploitable flaw in SQLite by taeric on Tuesday October 25, 2022 @05:15PM (#33336269)
Coming back to this, I understand your previous post about "this" now. :D Apologies on misunderstanding that the first time around!
Re:Stranger Strings: An exploitable flaw in SQLite by kyralis on Tuesday October 25, 2022 @09:20PM (#33338506)
> Once you have 100% branch/statement coverage in your tests, all bugs that are left are those that arise from the interaction of two or more statements, in a way that wasn't covered in the tests.

A bit tangential, but this statement is not accurate. You can have complete branch/statement coverage and still have single-line bugs due to not fully testing the domain/range of all relevant variables; the simplest example is the potential for divide-by-zero bugs in otherwise fully tested code paths.

100% branch/statement coverage is necessary for real confidence, but it is sufficient for very little.

Re:Stranger Strings: An exploitable flaw in SQLite by paulmd on Tuesday October 25, 2022 @01:53PM (#33333968)
> Tests only validate known behavior. They didn't have a test that exercised a large string.

Which is the classic thing with no-code and with Copilot-style assistance: writing the function that meets the spec is easy. Writing a comprehensive and correct spec is the hard part.

It's like thinking someone is a better programmer because they type faster or have a better keyboard or whatever: the words aren't the hard part, typing is maybe 10% of the time you spend programming at most. It's logical correctness in composing those functions, and being able to "hold the entire sculpture in your mind" so to speak.

Re:Stranger Strings: An exploitable flaw in SQLite by rowanG077 on Wednesday October 26, 2022 @10:03AM (#33343870)
A function in a programming langauge is nothing more then a spec. Programming is writing or translating the specification.
Re:Stranger Strings: An exploitable flaw in SQLite by hulitu on Tuesday October 25, 2022 @03:37PM (#33335151)
Welcome to SW testing. Testing for limits is a no go. Testing for random input is a no go.