OpenSSL: Buffer overflow in EVP_EncodeBlock() (CVE-2026-121481, CVSS 9.8) (github.com)

357 points by JacobHenner 19 hours ago

amluto 17 hours ago

On a very very quick read, the bug is that EVP_EncodeBlock malfunctions if the input is larger than ~1.5GB. EVP_EncodeBlock is a function that encodes base64.

https://docs.openssl.org/1.0.2/man3/EVP_EncodeInit/

As a seasoned C programmer, I can immediately observe that the whole API is bad: the caller is expected to calculate the buffer length on their own, using a nontrivial formula, and the caller does not pass in the output buffer length, so the implementation cannot validate it. But apparently OpenSSL 4 also implemented it wrong and wrote (possibly far) past the end of the buffer.

You should probably assume that, if you are running anything that can be convinced to use this API to encode a very long blob as base64, then you are in trouble. I don’t know why a modern server would do this.

BTW, OpenSSL seems to be a rather low quality implementation of a very low quality set of APIs. Stay away.

edit: Fixed my size threshold, hopefully. I was thinking of unsigned ints, but this is a signed int. I have not looked at the code, just the description.

socketcluster 14 hours ago

> BTW, OpenSSL seems to be a rather low quality implementation of a very low quality set of APIs.

Fully agree with your assessment above that line, but damn, this is a strong statement for a library this ubiquitous. You wonder; how could this happen? And yet, as an open source developer myself, I know how little people care about code quality.

Gigachad 14 hours ago

We have known this since at least heartbleed. The answer was that basically no one funds the project and it had only one developer.

All these trillion dollar tech companies have been leaching off open source for free and never contributed back to the projects they rely on.

k_sze 13 hours ago

LytraX 13 hours ago

socketcluster 13 hours ago

StilesCrisis 7 hours ago

coliveira 7 hours ago

rwmj 12 hours ago

If you've ever tried using OpenSSL you'll know that it's true.

The API is a fractal of bad design. Not just that, but because of the API refusing to make sensible choices, it forces everyone using it to be an expert in cryptography, with predictable results for those programs that use it.

perbu 10 hours ago

How it happened? A lot of features in OpenSSL was written as part of a PhD and dumped in the repo without any thought about long term maintainability or quality. Now, during the last 5 years or so, people have been trying to straighten it out, but this is a pretty daunting task.

pseudohadamard 7 hours ago

yayachiken 11 hours ago

SSL/TLS has always been a wonky and complicated standard built upon other wonky standards like x509 and ASN.1 (for PKI) that nobody would touch unless they are forced to.

There is a reason why people did not do a lot of TLS (outside of anything involving monetary transactions) before Firesheep, the NSA leaks were the final nail in the coffin for unencrypted HTTP. On top of that Let's Encrypt and ACME did not exist, so TLS was behind a paywall on top of that.

And then everything proliferated relatively quick even for tech standards. I guess people grabbed onto the next available tooling just like a drowning person would take any piece of driftwood.

Not so fun fact: AFAIK the openssl binary was initially explicitly meant to be only used for testing. That is why its command line is so strange. It was initially meant to expose a couple of low-level primitives, not to implement workflows. One example would be the openssl-ca man page, which explicitly mentions this. People didn't care because unfortunately you could somehow do everything you could ever want with the openssl binary and I guess that is also something how the impression stuck that openssl is the most advanced library.

Woodi 9 hours ago

asveikau 4 hours ago

Many people are using forks that are mostly API compatible. So the ubiquity is not as huge a problem as it used to be.

throwaway2037 12 hours ago

    > And yet, as an open source developer myself, I know how little people care about code quality.
This is a weird statement. I am someone who has worked on closed-source internal enterprise software for my entire career. Universally, the internal source is worse that the numerous open source libraries that we use. If anything, open source has "more eyeballs" than closed source, so the code quality will be better.

firesteelrain 5 hours ago

bjackman 9 hours ago

I'd like to point you to: https://www.haproxy.com/blog/state-of-ssl-stacks

Among the deeply technical and highly credible and detailed articles I've read in my life, it's definitely the spiciest. At the end:

> It is often said that fixing a problem requires smarter minds than those who created that problem. When the problem was architected by a team with strong convictions about the solution‘s correctness, it seems extremely unlikely that the resolution will come from the team that created that problem in the first place. The lack of progress in the latest releases tends to confirm these unfortunate hypotheses. The only path forward seems to be for the team to revert some of the major changes that plague the 3.x versions, but discussions suggest that this is out of the equation for them.

IOW this extremely strong claim does seem to be supported by extremely credible actors.

StilesCrisis 7 hours ago

Google forked OpenSSL in 2014 (BoringSSL) with a pretty similar rationale, stated more diplomatically.

hobo123 4 hours ago

alienbaby 12 hours ago

I remember a long time ago reading openssl was dumpster file code quality wise. I guess it was just built that way and never improved.

secondcoming 10 hours ago

topspin 11 hours ago

> You wonder; how could this happen?

It all came from a bad place. OpenSSL grew from primitives created by cryptographers. Cryptographers are great, and they make fabulous things. But almost none of the understand software development or care a great deal about the mundane matters of API design, or the obnoxious limitations of naively designed processing elements.

Others have cited the documentation for EVP_EncodeBlock(). In the mind of a cryptographer, the text is perfectly clear and trivial, and they likely haven't exposed themselves for many years to anyone that can't read that exactly once and not immediately and correctly visualize the necessary formulae. Nothing wrong here at all. The fact that on real computers, numbers don't just scale to whatever value a computation requires is merely a defect in the design of the machine.

pixl97 5 hours ago

cowlevel 11 hours ago

Because you don't roll your own SSL.

vlovich123 17 hours ago

> BTW, OpenSSL seems to be a rather low quality implementation of a very low quality set of APIs. Stay away.

We’ve known this for well over two decade since heartbleed yet for some reason Linux distros haven’t migrated off of it

dcrazy 17 hours ago

For those too young to remember 2014, Heartbleed led to both BoringSSL and LibreSSL being forked from OpenSSL.

stock_toaster 15 hours ago

b112 14 hours ago

morkalork 16 hours ago

DANmode 15 hours ago

Not breaking userspace is more important than security………

asveikau 3 hours ago

Skunkleton 13 hours ago

vasco 13 hours ago

CrimsonCape 14 hours ago

I just don't get it; this is a task to hand to an LLM, "go rebuild OpenSSL, use Rust (no mistakes)" and have it churn through a greenfield implementation. Then open a PR =). Why hasn't this happened yet? The fact that the LLM will write tests and deal with all the compiler errors probably puts it lightyears ahead.

brianpane 14 hours ago

b112 14 hours ago

fock 14 hours ago

teunispeters 16 hours ago

I like to declare that industry coding standards such as MISRA exist precisely because code bases like OpenSSL (specifically) exist, as it's such a good example of breaking every sensible rule in the standards.

rcxdude 2 hours ago

MISRA's not great itself, though. Half of it is obvious and could be summarised as 'don't invoke undefined behaviour' a quarter is rules to get around absolutely terrible ancient compiler problems, and a quarter are arbitrary restrictions that don't really help improve code quality much. For example, the interface of this function wouldn't break any MISRA rules in a way that would force it to be any better.

ozgrakkurt 12 hours ago

Even the discussion in the PR about not handling the errors in all call-sites is revealing imo.

dataflow 10 hours ago

What is it revealing? I read it and the assertion seemed like a reasonable middle ground.

cryptonector 2 hours ago

Many OpenSSL APIs are terribly designed.

znpy 10 hours ago

> BTW, OpenSSL seems to be a rather low quality implementation of a very low quality set of APIs. Stay away.

Yep, this is not news. https://en.wikipedia.org/wiki/LibreSSL was forked off OpenSSL now more than ten years ago to address exactly these kind of issues, and more (at the price of occasionally taking some drastic measures)

But somehow we're still here.

pak9rabid 6 hours ago

See: Lindy effect

octoberfranklin 16 hours ago

This is really embarrassing because this isn't even ancient code.

OpenSSL has been around a long time and has a lot of legacy code, but this is in OpenSSL 4.x only -- stuff that was written in the last ~year.

If they don't have the manpower to write new code safely they should just stick to maintaining what they've already written.

kroeckx 11 hours ago

This function has been there since the first commit in git history, from 1998.

fock 14 hours ago

and now guess who helped writing this code. the chicken are coming home to roost, but people who are happy about their youthful productivity or stock packages will not be able to notice...

the code before this PR included the check. But that was old code!

mort96 11 hours ago

I've been annoyed by writing code against OpenSSL's APIs before, precisely because it expects me to provide "appropriately sized buffers" without documenting the correct way to compute the correct size very well.

kvuj 17 hours ago

> EVP_EncodeBlock() encodes a full block of input data in f and of length dlen and stores it in t. For every 3 bytes of input provided 4 bytes of output data will be produced. If dlen is not divisible by 3 then the block is encoded as a final block of data and the output is padded such that it is always divisible by 4. Additionally a NUL terminator character will be added. For example if 16 bytes of input data is provided then 24 bytes of encoded data is created plus 1 byte for a NUL terminator (i.e. 25 bytes in total). The length of the data generated without the NUL terminator is returned from the function.

My god, you only see this type of horrendous API in C don't you.

cesarb 15 hours ago

> My god, you only see this type of horrendous API in C don't you.

This is the appropriate place to put a link to this pair of classics on API design:

"How Do I Make This Hard to Misuse?" https://ozlabs.org/~rusty/index.cgi/tech/2008-03-30.html

"What If I Don't Actually Like My Users?" https://ozlabs.org/~rusty/index.cgi/tech/2008-04-01.html

cowlevel 7 hours ago

Ekaros 12 hours ago

It makes lot of sense when you think what encoding here does. Changes 3 arbitrary bytes to 4 bytes with only some values being possible. Null termination is one issue, but the output is a string such only length of the text itself makes sense.

td521534f12 17 hours ago

"No way to prevent this" say users of only language where this regularly happens

https://xeiaso.net/blog/series/no-way-to-prevent-this/

userbinator 17 hours ago

What's "horrendous"? I don't see anything which stands out as being wrong. It specifies exactly the lengths of input and output.

gets(), on the other hand, that is "horrendous".

amluto 16 hours ago

IanCal 13 hours ago

kvuj 17 hours ago

landr0id 17 hours ago

>As a seasoned C programmer, I can immediately observe that the whole API is bad: the caller is expected to calculate the buffer length in their own, using a nontrivial formula, and the caller does not pass in the output buffer length, so the implementation cannot validate it. But apparently OpenSSL 4 also implemented it wrong and wrote (possibly far) past the end of the buffer.

Many such cases.

I expect we'll see some fun libyuv bugs soon in applications which decode media. The APIs are begging for misuse.

https://chromium.googlesource.com/libyuv/libyuv/+/refs/heads...

ronfriedhaber 11 hours ago

> BTW, OpenSSL seems to be a rather low quality implementation of a very low quality set of APIs. Stay away.

Well, it depends. if in the coming weeks many more Heartbleed-level vulnerabilities would be exposed, {Amazon, Google, OpenAI, Anthropic} can just rewrite it in Rust, formally verified.

There does not exist such implementation as of now as OpenSSL was good enough, AI may expose so many security flaws it would no longer be good enough.

tredre3 2 hours ago

> There does not exist such implementation as of now as OpenSSL was good enough

A fair amount of such implementation do exist.

Gibbon1 13 hours ago

What's obnoxious is the WG14 standard committee could have at any time in the last 40 years provided a standard slice and buffer type that would go a long way to discourage trash API's like this one.

I swear it's de rigueur in C that if an operation requires 5 parameters to insure the operation is error free than the function shall only take 4 parameters.

Rewriting the function with idiot mode disabled

int EVP_EncodeUpdate(EVP_ENCODE_CTX ctx, buffer_t out, const slice_t in);

adev_ 13 hours ago

> What's obnoxious is the WG14 standard committee could have at any time in the last 40 years

Or just use bloody C++ that solved that years ago with std::span.

Unfortunately, many C dev prefers whining about "How horribly bloated" C++ is instead of using the part that makes sense.

Gibbon1 13 hours ago

0points 13 hours ago

zzril 10 hours ago

How dare you give your parameters names of multiple characters!

Gibbon1 an hour ago

0xbadcafebee 13 hours ago

> I can immediately observe that the whole API is bad

I see this is your first time reading OpenSSL code

gspr 14 hours ago

> BTW, OpenSSL seems to be a rather low quality implementation of a very low quality set of APIs. Stay away.

Well sure, but the world doesn't seem to be able to agree on, or put resources into, a strong contender.

I'm usually for heterogeneity and diversity in the software ecosystem, but for cryptography I'd be happy with a single high-quality "anointed path". Because cryptography.

cowlevel 10 hours ago

other commenters mentioned boringssl (used by Google everywhere it applies), LibreSSL (used in BSD), rustls (used in Rust). Go has its own implementation just called crypto/tls.

gspr 9 hours ago

baq 13 hours ago

One of the ‘rewrite it in rust’ projects that should really cause anyone to be offended IMHO.

p_l 13 hours ago

The problem with "rewrite this in Rust" is more that Rust has laughable amount of Tier 1 platforms.

Now, rewrite in Ada, given that GNAT supports the same targets as rest of GCC...

baq 13 hours ago

userbinator 17 hours ago

if the input is larger than ~1.5GB.

...on a system where ints are 32 bits. The bottom line is that this doesn't appear to be easily exploitable and IMHO it should be the callers of EVP_EncodeBlock which need to be inspected to determine the actual risk.

using a nontrivial formula

It's base64. 4/3 expansion; round it up and add padding. What's "nontrivial" about that?

and the caller does not pass in the output buffer length, so the implementation cannot validate it

Not necessary, because the caller is responsible for allocation.

sweetjuly 15 hours ago

I am confused why you make out 32 bit int as being rare. Almost all devices that you'd reasonably connect to the internet at this point have int as 32 bits

amluto 15 hours ago

> It's base64. 4/3 expansion; round it up and add padding. What's "nontrivial" about that?

If you mean ceil(inlen * 4/3) + 1 (even if you use exact arithmetic), then you are passing too small a buffer and you will overflow. Maybe your “add padding” part fixes it? In any case, I think that the fact that this confusion is even possible proves my point.

You should not need to read the manpage of a function you are calling in order to determine whether you have passed a large enough buffer to avoid overflow.

Reading the manpage to get the function to not return an error would be a different story.

userbinator 15 hours ago

mrheosuper 17 hours ago

The question can be reduce to "who do the length validation".

In my case, if i write a public-facing API, i never trust the caller will do the correct thing, thus the caller must provide all the critical parameters, and i must validate all of them.

userbinator 16 hours ago

userbinator 17 hours ago

I think CVSS 9.8 is exaggerated. This is not remotely anywhere near as serious as Heartbleed. It's an internal function which will fail if its input is far too long, but exploitability rests on how untrusted input can reach it; the key word being "untrusted". E.g. if you operate a base64 encoding service on the Internet that just reads all the data into memory at once and calls EVP_EncodeBlock(), that's exploitable. If you have a protocol that involves a block of data with a 16-bit length field which is passed to EVP_EncodeBlock(), that's 100% safe.

For those wondering about TLS: speaking as someone who has written a TLS implementation, AFAIK neither base64 encoding nor decoding occurs in the protocol itself, and the longest length field is 24 bits (Hello stream). Certificate processing involves ASN.1 which does support arbitrarily-long integers, but that's a big hint to check that they're within a sensical range.

jtrn 9 hours ago

THIS!!!!!!!!!!!!!!! THIS times 10000!

I'm starting to get annoyed about the OMG OMG BREAKING BREAKING ALARM-EMOJI crap that's not a real emergency.

Four times in the last month, I dropped everything and started investigating whether a serious CVE related to any of our dependencies warranted an emergency bump, only to be frustrated that images, even from AWS, did not have the fix yet. So then I had to worry about whether I should build from source. We actually built PHP from source and deployed it to prod, just to get ahead of the PHP2Shell vulnerability

But yesterday's PHP vulnerability, CVE-2026-115560, didn't even apply to us or most people running PHP, and I don't think there are any realistic working exploits out there. I'm not saying that it's not possible, but I'm starting to feel that there's a large difference between what's theoretically possible and what's practically possible. And given the storm of patches and vulnerabilities found, this will become increasingly important to ask.

I think everything above a CVE score of 9.0 should warrant some level of “how exploitable is this in real life,” and anything above 9.5 should be proven to be easy for an attacker to execute, not just “possible in theory.” I don't see how we will survive as developers if there isn't some sort of better triage for vulnerability severity assessment. If everything is an emergency, then nothing is an emergency.

ylk 6 hours ago

There are more values in the CVSS vector you can fill in yourself: environmental and threat scores

So you can take e.g. a 9.3 critical down to 6.5 medium by setting CIA requirements to low and exploit maturity to Unreported.

I’m not saying CVSS is perfect but if you want to have a score that applies to your environment, you have to input some info about your environment into it.

“how exploitable is this in real life” is answered by the exploitability score, which is calculated from Attack Vector, Attack Complexity, Attack Requirements, Privileges Required, and User Interaction scores.

jtrn 5 hours ago

stingraycharles 7 hours ago

Yes, and this also causes inertia, as if everything is super highly critical it means nothing is, and people will stop caring when something is actually serious.

Heartbleed, Spectre, log4shell, they were all worthy of a 9.8.

This isn’t.

dboreham 5 hours ago

Yes. Lots of this. E.g. the nginx flap yesterday depended on http/2 being enabled, which it isn't by default. AI can be helpful with the analysis though.

guipsp 3 hours ago

jeroenhd 7 hours ago

CVSS scores do not indicate priority. They give a baseline so you can pick what CVEs affecting you you should do risk analysis for first.

The score is just fine. The people misinterpreting everything with a CVSS score higher than 8 as the end of the world are panicking over nothing.

da_chicken 7 hours ago

This. It's a calculated score based on pretty objective measures. Yes, the CVE[0] notes that "The severity is Low because no attacker-controlled path to the overflow is known."

But risk or severity is not what CVSS measures. It's a score intended for security professionals who know the context, graded against a fixed algorithm, with a fixed definition for each answer. The nvd.nist.gov site isn't always the easiest to use, so grab a good CVSS calculator[1] and look at what it means. That's why the alphabet soup vector string is there: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

I'm sorry, CVSS wasn't meant to eliminate your need to think or understand your environment. Yes, if it's a 9.8 CVSS you should look at it. Triggering you to look at it is all the CVSS is meant to do!

Now, whether you think CVSS scores mark too many things as High or Critical is a little secondary. There is a reason we're at CVSS v4. Defining metrics and keeping them useful while remaining objective is difficult. This vulnerability, however, is exactly the kind a chain exploit would take advantage of.

[0]: https://www.cve.org/CVERecord?id=CVE-2026-121481 [1]: https://www.metaeffekt.com/security/cvss/calculator/

dns_snek 5 hours ago

npongratz 7 hours ago

> The people misinterpreting everything with a CVSS score higher than 8 as the end of the world are panicking over nothing.

They are indeed, but that means CVSS has turned into a trigger for The Boy Who Cried Wolf. So we need a different metric. The problem, of course, is that adding a new score creates an xkcd 927 issue.

jeroenhd 6 hours ago

zzril 10 hours ago

"Internal"? It's documented in the `libssl-dev` manpages.

(Although I agree it should be an internal function.)

tptacek 17 hours ago

(I'm a broken record on this so I'll keep it brief). The problem here is that the CVSS score is in the headline, as if it meant anything. But CVSS doesn't mean anything. It's a Ouija board; VR people jack it up to get attention, vendors nerf it to chill their customers out.

Someone should design something better, and less malleable.

csnover 16 hours ago

A few years ago I participated in a study[0] about CVSS and apparently was very much in the minority in feeling that these scores are essentially useless. I have no idea what would actually shift the majority’s opinion on this, but I will at least echo your sentiment that everyone deserves something better.

[0] https://arxiv.org/abs/2308.15259

tptacek 16 hours ago

pseudohadamard 6 hours ago

vasco 13 hours ago

CVSS would be fine if they shared full vector rather than adding up the score. The vector is representative of what. Going from what to "how bad" through making it a single number is where they messed up because the weights usually don't make sense from case to case.

lillesvin 10 hours ago

JJJollyjim 13 hours ago

userbinator 15 hours ago

I think tiny pieces of isolated code like this function simply cannot be assigned CVSS scores, because it's missing all the context and threat model around how it is used.

Then again, given that I once had to respond to a report which assigned a similar amount of severity to the strlen() function claiming that it will read beyond its bounds if its input is missing a null terminator (DUH!), I'm not surprised at the lack of critical thought among a certain population in this industry.

solyin 15 hours ago

At the end of the day, sysadmins care about "how fucked am I" from an email subject line. A replacement system would be "let me run a daemon on your network telling me what you run" with vendors telling me about the vulnerabilies and I'll tell you if you (the sysadmin) give a shit. Technically that's trivial, but who's gonna trust me to run a daemon like that on their network. Maybe you'd have luck with your public history, but that seems like quite the uphill battle.

JJJollyjim 13 hours ago

nizbit 11 hours ago

Time is a construct. CVSS is a vibe.

WalterBright 2 hours ago

> Calling EVP_EncodeBlock() with an input length close to INT_MAX may overflow the calculation of the encoded output size and write past the end of the caller-supplied output buffer.

Haven't we suffered enough yet with lack of a basic feature in C? Why are enhancements going into C that never address this fundamental problem?

I wrote this proposal for C 17 years ago:

file:///C:/digitalmars/articles/C-biggest-mistake.html

It's a simple addition, it breaks 0 code, and provides a path forward to stop array overflows for good.

It's a foundational feature for D. We don't have buffer overflows.

ninglor 24 minutes ago

diath 2 hours ago

> We don't have buffer overflows.

You don't have that class of buffer overflows, but for as long as D allows raw pointer arithmetic, you still got buffer overflows, i.e. here's a simple snippet triggering ASAN: https://godbolt.org/z/qPhMKzM1z

Matheus28 2 hours ago

Might wanna double check that url

Sohcahtoa82 30 minutes ago

> file:///C:/digitalmars/articles/C-biggest-mistake.html

Is that URL supposed to be a joke?

ansipunk 15 hours ago

I am not a system administrator, but I am getting a serious vulnerability fatigue, every single day there's at least two new vulnerabilities in major pieces of software, I'm just tired of seeing that everywhere and hearing that everywhere. Fellow system administrators must be having it much worse.

jeroenhd 7 hours ago

The bugs were always there. The fixes are coming in fast today.

wry_xy 14 hours ago

I see bugs being patched, and software improving. Bring em on.

mort96 10 hours ago

Those aren't mutually exclusive... it's good that these bugs are getting fixed, but each critical severity bug that gets fixed is a headache for all of us who administer servers.

polycaster 13 hours ago

I see the Kessler Syndrome play out at work.

ansipunk 13 hours ago

pseudohadamard 6 hours ago

You're seeing bugs get band-aided. Clanker-generated band-aids for clanker-surfaced issues aren't necessarily a proper fix, and may even be a step backwards if they introduce new issues.

fock 14 hours ago

this bug was introduced by clankers most likely...

lionkor 13 hours ago

ImHereToVote 14 hours ago

This will lead to LLMs being embedded 24/7 into critical infrastructure. A "living" firewall and sysadmin.

WikiC 8 hours ago

Already happening. My org has shifted agentic vuln triage/patching to p0.

yfontana 13 hours ago

We could it call it a Blackwall

slekker 13 hours ago

The solution is {Open,Net}BSD

Geezus_42 11 hours ago

No it isn't.

anthk 9 hours ago

raizer88 14 hours ago

Don't tell me. I work for a bank and we have automated vuln checks on our code and dependencies and we can't release in pre-prod if we don't fix the cves. Basically since last year is 1 day you deploy new code and 2 days you deploy cve fixes.

jve 13 hours ago

That's a great process for a bank!

toenail 7 hours ago

Panzerschrek 16 hours ago

That's why it's recommended to use size_t for passing sizes of buffers. It's unlikely to get overflow with it. In this particular case input buffer needs to have size larger than half of address space in order to trigger overflow, which isn't possible (64-bit systems usually have only 48 bits of actual address space, 32-bit systems don't allow allocating so large blocks).

wahern 15 hours ago

Not everybody recommends size_t. There's a sizeable community of people absolutely convinced most integers, including length and capacity integers, should be signed. And they stick to their guns even for C and C++. They have some very compelling logical arguments on their side, but IMO in languages like C and C++ they're just fatally unrealistic.

ozgrakkurt 12 hours ago

This is anachronistic imo. There is no point of using signed or larger than needed integers when programming in a modern way.

You have fuzzing, test coverage checks, overflow checks, static analysis, llm review. There is no conceivable reason why you might have a problem with using an u16 for a buffer length.

Even reading the PR comments shows that these libraries are just really low quality.

They are discussing if they should check the error return on callsites now that they made a function fallible.

Even a library like openssl using raw arithmetic operators all over the place is just weird imo. Every arithmetic operation should be checked version of the operation unless there is a provable performance hit. Languages should just not have operators

uecker 14 hours ago

Why unrealistic? I was in the unsigned camp a long time ago and switched to signed types for indexing and sizes, and this made many problems go a way.

There was just a nginx issue that highlights how problematic the use of unsigned is in this context: CVE -2026-123007

wahern 13 hours ago

reillyrider 10 hours ago

jurf 13 hours ago

ssize_t

throwaway2037 10 hours ago

    > That's why it's recommended to use size_t for passing sizes of buffers.
I have always been told it is a bad idea to use unsigned integers in your interfaces. Why? An accidental negative (signed) value will be cast into an enormous unsigned value. For example, if you look at the vast majority of the Win32 API, inputs are normally signed integers. They rarely use unsigned integers.

Panzerschrek 5 hours ago

> An accidental negative (signed) value will

If you use mostly unsigned values it's not a huge problem, as long as you don't perform subtractions or operations with possibility of overflow. If obtaining a negative value or getting an overflow may occur, you should perform proper checks before calling an API function. And in case of WinAPI or something similar usually no extra computations before a call are necessary, arguments are already precomputed (like with buffer sizes).

m00dy 16 hours ago

never say never :)

chillax 11 hours ago

lpapez 4 hours ago

Bookmarked this, thanks for sharing!

This is what the scores should have been, I'm tired of these 9.0+ vulns every other day.

asqueella 7 hours ago

Thanks for sharing!

I like the site: concise explanations, commands to check if you’re affected (if available), and low traffic RSS subscriptions as they only process vital CVEs. Hope it continues to operate!

VladVladikoff 18 hours ago

:/ I really need a day off from patching servers.

pixl97 18 hours ago

Sorry buddy, back to the server mines for you!

And yea, I'd really like a day where I'm not writing an email to customers about what they do and don't need to update regarding our software.

staplehorse6553 14 hours ago

If you stopped patching servers, you wouldn't be affected. Always use trusted, 5-10+ years old code.

fc417fc802 12 hours ago

Just stick to windows xp sp1 indefinitely. Those were simpler times. /s

Geezus_42 10 hours ago

Don't worry. No enterprise distro have shipped OpenSSL 4.

roygbiv2 13 hours ago

Same! Just did a whole bunch of out of band patching, more on the weekend. Fun times.

pseudohadamard 5 hours ago

"Baldrick, you can have a day off when you're dead"

txdv 15 hours ago

call in the agents

asveikau 18 hours ago

Seems like only OpenSSL 4 is impacted? What distros and systems use that?

I feel like in the post heartbleed era, a lot of people are not including new features of upstream openssl as much as they used to.

agilob 14 hours ago

Arch

    pacman -Q  | grep openssl
    openssl 4.1.0-1
    openssl-3 3.5.9-2

philipwhiuk 8 hours ago

Yeh but Arch is more of a vibe than an actual distribution.

hurricanepootis an hour ago

CER10TY 13 hours ago

Considering OpenSSL 4.2 is the first proper 4.x LTS release, I think most distros will still be on OpenSSL 3.x so not impacted.

Bleeding edge distros like Arch/Fedora are already on 4.x, so they'll be impacted, but they should also receive a patch relatively quickly.

daemonologist 17 hours ago

Well, Fedora 45 (with which I am composing this message).

Fortunately it doesn't look like I need to patch anything at work though.

moezd 14 hours ago

The more I see these posts, the more I'm convinced that "never reinvent the wheel" mentality we had so far in software engineering basically covered up a lot of lazy engineering, and we just pretended everything was fine. It's like these findings cross-pollinate.

stellalo 14 hours ago

Not reinventing the wheel is fine. But one should change tires every now and then!

kugelblitz 13 hours ago

More like, we used to kick the tires and do manual inspections with a flashlight, now we have an automated tire checking system with multiple sensors that's uncovering stuff that manual inspections didn't see.

fock 14 hours ago

that bug likely came from reinventing the wheel

suddenlybananas 12 hours ago

It was introduced a year ago, so yes.

GalaxyNova 14 hours ago

Whaat? You want me to implement left-pad on my own? /s

MarekKnapek 11 hours ago

What about LibreSSL, BoringSSL, WolfSSL, BearSSL? Are those vial replacement for OpenSSL. I know there was a lot of fuzz back then after HeartBleed, but how about these days?

ankit84 11 hours ago

Is this demonstrable? or a finding, that can be exploited?

globular-toast 13 hours ago

So what's the timeline here? About a week ago (damn UIs that don't easily let you see the actual date) someone submitted a PR, but only two days ago the CVE was public. The PR is still not merged. Was the team let know in advance but ran out of time to patch or something?

metaphoric 11 hours ago

OMG

srgb_vs_cmyk 10 hours ago

Oh god, the discussion about fix is the most C thing ever, it makes the recent musl issue much more understandable:

- Let's return -1 for error

- People might not expect new -1 value, let's return 0

- How are clients supposed to differ between old 0 and new 0

jeroenhd 7 hours ago

It's not even C, most of the Windows API solves this problem by operating on handles error codes are clear and error checking becomes easier (though it still goes wrong). Good old winerror even has bit patterns to see what sort of error you're dealing with.

The Unix flavour of C, which relies on passing magical numbers, is making C's lack of proper error handling patterns a lot worse.

sorrywhat 11 hours ago

Is this going to be the 39th 9.8 CVE that results in 0 websites getting hacked?

I need some of you people to get hacked so I have something to point to, or I won't be able to convince management that this is worth taking seriously for much longer.

Geezus_42 10 hours ago

Since none of the enterprise distros have shipped OpenSSL 4 yet, this is not as serious as people are making it seem.

jeroenhd 7 hours ago

A CVE score doesn't determine your chance of getting hacked. It doesn't even determine how badly fucked you are if you don't update. You can have a CVE 10.0 that only affects you if your computer is set to a North Korean locale locate in Antarctica.

It's a number to guide your risk assessment process. If you don't have one of those, you shouldn't worry about them and read what people with risk assessment processes write about the CVEs.

Some people processing a lot of data are probably panicking right now. I doubt any website will get hacked.

jerf 18 hours ago

So, uh, like, any word on what the "9.8" actually means? Is this "an obscure feature nobody has on could with a bit of luck and a cosmic ray strike allow arbitrary code execution if you're one of the few people using it" or is this "if you have a socket with OpenSSL exposed to the internet you're already compromised" or what?

fulafel 14 hours ago

This was possibly a rhetorical question but apparently it goes something like this - just a simple formula someone came up with that tries to model badness:

  # Hardcoded weights for AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  attack_vector = 0.85        # Network
  attack_complexity = 0.77    # Low
  privileges_required = 0.85  # None
  user_interaction = 0.85     # None
 
  confidentiality = 0.56      # High
  integrity = 0.56            # High
  availability = 0.56         # High

  impact_sub_score = 1 - (1 - confidentiality) \* (1 - integrity) \* (1 -  availability)  # -> 0.91 
  impact = 6.42 \* impact_sub_score                                                       # -> 5.87

  exploitability = (
    8.22 \* attack_vector \* attack_complexity \* privileges_required \* user_interaction)  # -> 3.88

  score = impact + exploitability                      # -> 9.76
(using Github's values from https://github.com/advisories/GHSA-83xj-7xh4-4p7x)

Interesting that the impact calculation treats C, I, A as equal. And of course a lot of those inputs are just human(?) supplied vibes and/or context dependent in your use case.

jerf 3 hours ago

Not quite what I meant. Having been on the end of trying to establish CVE scores for bugs myself I am well aware that even two bugs of the "same score" can be very different in nature. A "push button, pop every website on the internet" is a 9.8-ish, but so is "nginx with this particular couple of config settings will yield a root shell for a particular request" even if it "only" affects 5% of the world, because "affecting 5% of every nginx install" is still fairly justifiably a high rating for all the scores. The scale tops out at the upper end.

Plus we're seeing "AI has found this bug and it looks super duper scary everyone panic" followed by two weeks later "well actually it took sustained and direct assault on a website and sometimes it didn't work and it was actually more like a 6.4" lately.

Geezus_42's "you probably haven't actually shipped this code anywhere anyhow" is more like what I was looking for.

arch-choot 13 hours ago

CIA psyop confirmed? (/s)

pixl97 17 hours ago

So this might be very similar to Java4shell, though will need to be verified.

This is another base64 encoder where it takes a blob and coverts it to base64. I'm assuming an attacker control bit of data could be passed to the function which then overflows. Not sure if it can attempt to control a valid address or not, but unlocked AI likely could pretty quick.

Geezus_42 10 hours ago

Since no enterprise distro has shipped OpenSSL 4 yet, it will only be an issue if you are running an upstream distro on a personal machine.

orblivion 5 hours ago

This should probably be in the headline. I was trying to figure out why Debian didn't have an update.

Geezus_42 2 hours ago

cobychapple 8 hours ago

if your threat model includes someone setting a 1.6GB proxy password, the base64 encoder isn't where you've lost

hinkley 11 hours ago

I think that’s enough Internet for me this week.

m00dy 17 hours ago

>>I am really worried about the negative return value being added. Existing third party callers might not be ready to handle this correctly (i.e. if they cast the return to size_t without checking). Could we instead return 0? (In all the added error returns in this PR.)

Rust fixes it.

layer8 11 hours ago

Rust does not fix existing third party callers.

m00dy 6 hours ago

yes, it does. Please refer Rust's return types

layer8 6 hours ago

bjoli 13 hours ago

Sometimes I like to think of how little performance would be lost and how much would be gained by just collectively deciding to use Option/Result instead of sentinel values.

Things like the dumb (not like I'm any individual being dumb. Just collective accumulated stupidity) a*hole vulnerability some weeks ago. That wasn't even performance sensitive.

sippingabonedry 17 hours ago

Be sure to let us know when your equivalent Rust crypto library is available.

m00dy 17 hours ago

we don't need many crypto libraries, maybe just one for the whole world, written in Rust and then all functions are math-proofed.

uecker 14 hours ago

_ache_ 14 hours ago

td521534f12 16 hours ago

staplehorse6553 14 hours ago

cyberax 16 hours ago

jo-m 13 hours ago

vasco 13 hours ago

If the first replies I got from maintainers were those I'd tell them to fuck off then and keep having a broken library. They are like stackoverflow curmudgeons and it's not surprising other libraries appeared - who would want to deal with this.

globular-toast 12 hours ago

What in particular do you find disagreeable here?

shepherdjerred 17 hours ago

It feels to me the only way to beat LLMs finding vulnerabilities is to have LLMs (or LLMs paired with other AI methods) constantly monitor your infrastructure, traffic, database, etc. to ensure that nothing out of the ordinary is happening

tptacek 17 hours ago

I think so too; I think apart from pushing vulnerability research forward (which is important on its own merits just for computer science reasons), the major engineering challenge of this moment is figuring out how to make platforms resilient without rewriting everything; that could be better live-patching, it could be some weird monitoring thing, it could be automatic segregation and workload isolation.

It's not "just keep up with the patches". That's going to be a losing strat.

NoDodgeQuestion 11 hours ago

maybe today, you cant keep up, 2 year later, AI rewrite everything safe in rust, you wont need patch everday

Geezus_42 10 hours ago

fauchletenerum 15 hours ago

I'm not sure how cost effective or even viable that option would be. I think the only practical defense is some kind of baseline hardening at the OS or application level. Something like eBPF rules i.e. what Cilium Tetragon policies provide. Basically it seems like there's no way to guarantee that your application code can't be exploited in some novel way so your best option is to restrict them as much as possible.

shepherdjerred 13 hours ago

I'm really just talking as a layman here.

My feeling is that if we use traditional security approaches that seems like a losing strategy. You cannot just keep patching. I mean obviously you should, but that is not enough.

LLMs are finding zero days in operating systems, language runtimes, everything. They will definitely be finding holes in your API. It is not a question of 'if'.

fauchletenerum 12 hours ago

fc417fc802 12 hours ago

> there's no way to guarantee that your application code can't be exploited in some novel way

As a thought experiment if this hypothetical application code were written in something resembling haskell I suspect it would actually prove fairly difficult if not impossible to find novel ways to exploit it. I think at that point an attackers only options are logical inconsistencies in the underlying business logic (see that one NASA rocket) or bugs in the compiler and runtime.

mborch 11 hours ago

Or use defense in depth. There will be a vulnerability in every layer with some non-trivial probability, but rarely in multiple layers at the same time.

leptons 13 hours ago

When Plex got hacked and my linux server had a cryptominer installed, I had no clue where to start fixing it. I loaded up Claude to analyze the system logs, and it told me what commands to run (and why) and the infection was gone in about 10 minutes. There's no way I would have known the many things I needed to do to fix and secure the system. I'm fairly new to Linux, and without the AI I would be helpless with some of the tricky things.

kryptiskt 13 hours ago

The right thing to do in that case is to save whatever data you need from the server and then nuke it thoroughly, which means all the disks should be wiped, don't keep the old UEFI partition around, and reinstall. It would be preferable to skip the first step and get the data from a source that wasn't compromised, but sometimes you have bring out the hazmat suits to recover stuff from compromised systems.

shepherdjerred 13 hours ago

This is very reactive though -- imagine you were a business. You'd be screwed. Your data is already gone.

LtWorf 7 hours ago

You're still helpless, since you didn't do what you should have done (format).

sippingabonedry 17 hours ago

I see the OpenBSD guys are all over the PR (deservedly) shitting all over the proposed fixes so I assume LibreSSL may be impacted? Or are they just providing free advice and color commentary?

collinfunk 17 hours ago

I'm not really involved in OpenSSL, aside from a few tiny changes and commenting on a few things that affected GNU coreutils. However, I have seen Bob, whom I assume you are referring to based on the profile picture, participate in many discussions. I wouldn't infer too much from it.

bentley 15 hours ago

Bob is a member of the Engineering & Standards team at the OpenSSL Corporation.

https://openssl-corporation.org/leadership.html

sippingabonedry 17 hours ago

Do the projects collaborate closely since the split? My history is admittedly fuzzy.

Sometimes the fix can be worse than the bug. Like patching a hole in the wall.

wahern 15 hours ago

bvttf 17 hours ago

I think the second, LibreSSL was forked before OpenSSL v3 and this only impacts OpenSSLv4.

aaronbwebber 14 hours ago

Describing the comments on this PR as "shitting all over the proposed fixes" seems wildly out of proportion? This is direct, productive feedback on a PR that led to a consensus and approval on an appropriate fix in ~a week, we don't need to make the OS process sound worse than it is.

Ekaros 10 hours ago

To me it looked like entirely reasonable discussion. Return one value or return an other value. And which one should be chosen based on what is in general expected. And then also consider what parts of code can this sort of change impact.

I really find sad how far we have gone. Purely technical merits of a fix should always be an open conversation.

runiq 10 hours ago

Nobody is shitting over anything in that PR thread, please stop catastrophizing.

bjoli 13 hours ago

Isnit a cultural, maybe: i found bob to be constructive and to the point.