Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
CVE-2023-6246: Heap-based buffer overflow in the glibc's syslog() (qualys.com)
91 points by stevekemp on Jan 30, 2024 | hide | past | favorite | 18 comments


> 2023-12-05: Red Hat Product Security sent us a patch for CVE-2023-6246 (written by the glibc developers), and asked us for our feedback.

> 2023-12-07: While reviewing this patch, we discovered two more minor vulnerabilities in the same function (an off-by-one buffer overflow and an integer overflow). We immediately sent an analysis, proof of concept, and patch proposal to Red Hat Product Security, and suggested that we directly involve the glibc security team.


This all could be fixed with better string library, Strings in C are awful to deal with and most of such errors is about memory buffers for strings that are manually allocated.


The vast majority of services and user programs don't need to escalate privileges by invoking SUID/SGID binaries. no_new_privs should be used on them so that the "setuid with libc/LD programs" security boundary is avoided.


Man, am I tired of these security vulnerabilities caused by memory unsafety.

I hope my children will see the day when these kinds of software vulnerabilities only exist in "legacy" software.


As usual, my favourite quote,

"A consequence of this principle is that every occurrence of every subscript of every subscripted variable was on every occasion checked at run time against both the upper and the lower declared bounds of the array. Many years later we asked our customers whether they wished us to provide an option to switch off these checks in the interests of efficiency on production runs. Unanimously, they urged us not to--they already knew how frequently subscript errors occur on production runs where failure to detect them could be disastrous. I note with fear and horror that even in 1980 language designers and users have not learned this lesson. In any respectable branch of engineering, failure to observe such elementary precautions would have long been against the law."

-- C.A.R Hoare's "The 1980 ACM Turing Award Lecture"

Thankfully the powers of the law are finally taking attention to it, after a couple of decades since that speech took place.


> I hope my children will see the day when these kinds of software vulnerabilities only exist in "legacy" software.

The good news: the day will come when this kind of software vulnerability will only exist in legacy software.

The bad news: we’ll still be using legacy software at that time.


Worse news, even fewer people will know C to fix it


I'm tired of sloppy testing. This issue was discoverable via a fuzzer as noted in the bug report. Software that accepts external inputs needs to be fuzzed regardless of whether it is written in a memory safe language or not. Uncaught exceptions and panics are still bugs and recovering from one without clearing internal state could lead to a security hole.


The usual excuse for C and C++ security flaws,

"This shouldn't have happened: A vulnerability postmortem "

https://googleprojectzero.blogspot.com/2021/12/this-shouldnt...

Relevant quote,

"All of the NSS fuzzers are represented in combined coverage metrics by oss-fuzz, rather than their individual coverage. This data proved misleading, as the vulnerable code is fuzzed extensively but by fuzzers that could not possibly generate a relevant input."


> The usual excuse for C and C++ security flaws,

Saying "important software should be rigorously tested" isn't an excuse, it's an actionable and reasonable suggestion. Tut-tutting about implementation language choice in (literally) the platform C runtime is quite a bit less so.

Grandparent was being helpful, basically. You're just sniping.


> I'm tired of sloppy testing

Exhaustive testing tops out at about two float 32s[0], so of course do that for small functions, but for full application testing type checks are much cheaper.

[0] https://randomascii.wordpress.com/2014/01/27/theres-only-fou...


Fuzzing isn't exhaustive testing, it's dynamic coverage testing. You provide random input until you discover your (compiler-instrumented) binary doing something you haven't seen yet, then permute the input until you get it to do something else, etc... For almost all non-pathological algorithms, it's capable of reaching full coverage in linear time; though some algorithms are always going to have pathological edge and require some whiteboxing.


As always, Qubes OS is recommended if you really care about security. It saved me, again.


Is it really your main Desktop/Laptop? I'm intrigued by it but it looks pretty inconvenient. Do you find it usable?


Yes, it's my daily driver. It's much more convenient than people expect, can't recommend it enough.

Recent discussion: https://news.ycombinator.com/item?id=38690597


Amusingly, the first thread in there opens up about how Docker security is comparable to a VM, yet today has a Docker exploit on the frontpage https://news.ycombinator.com/item?id=39250975


"Dear Sir

We regret to inform you your children were killed by an AI using a memory unsafe language"


Maybe just the ECU of a car.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: