🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: netscape.public.mozilla.crypto
Article #6

Re: Real world switch () with the MPS memory pool system!

#6
From: Johann 'Myrkraverk' Oskarsson
Date: Sun, 11 Oct 2026 01:28
124 lines
7004 bytes
On 10/10/2026 5:02 AM, Johann 'Myrkraverk' Oskarsson wrote:
> On 10/10/2026 4:45 AM, Kaz Kylheku wrote:
>> On 2026-10-09, Johann 'Myrkraverk' Oskarsson 
>> <johann@myrkraverk.invalid> wrote:
>>> On 10/8/2026 9:31 AM, Kaz Kylheku wrote:
>>> And don't forget that just recently, people found a security bug in
>>> OpenSSL [again] just because they neglected to include a garbage coll-
>>> ector in the system.  Maybe they would have been better off, if they'd
>>> just used MPS from the start?
>>
>> Many programs that use OpenSSL nowadays are threaded.
>>
>> Threads + GC + stuff written in C => shit show
>>
>> You may fix some use-after-free bug, but you introduce 17 others,
>> the 16th and 17th of which won't be found until 2037 and 2050.
>>
>> I've pulled out my hair debugging GC problems in a single-threaded Lisp
>> implementation.
>>
>> You have to develop all the tooling and approaches for it because
>> none of the regular memory debugging tools understand your GC objects.
>>
>> I wanted Valgrind, so I had to integrate it, and it's not perfect.
>>
>> A newly created GC object is wrongly garbage collected, perhaps just
>> before it was properly made reachable. The object is reassigned to
>> a different purpose, but the original context uses it also. Happy
>> case: the object has a different type, incompatible with what the
>> original owner is doing, and so that blows up, and (happy again)
>> it happens close to where it was created. From there, there are
>> various shades of unhappy.
>>
> 
> That's fair.  And I deplore your lack of hair.  Mine -- as seen on Blue-
> Sky -- is not from fighting garbage collectors.  Though I suppose I
> could put more pictures of myself there.  So I'll keep that in mind as
> something to do over the weekend.
> 
> Now, on debugging garbage collectors, the MPS manual has this chapter on
> the subject,
> 
>    https://memory-pool-system.readthedocs.io/en/latest/guide/debug.html
> 
> and I have to say that I have not had the displeasure of needing to use
> it -- yet.
> 
> And on the subject of garbage collection and threads, the Memory Pool
> manual has this to say on the subject.
> 
>    The MPS is designed to work with multi-threaded programs. Functions in
>    the C interface are thread safe, except in a few documented cases. See
>    Threads. The allocation point protocol provides fast lock-free
>    allocation on multiple threads simultaneously. See Allocation.
> 
> So it would seem, at first glance, that the OpenSSL security issue --
> I'll link it if anyone cares to ask, but it should be readily found --
> would not have happened if they'd used the MPS from the start.  And
> since they don't, and never did, there is no second glance to prove me
> wrong.
> 
> I'll just note that I made the personal promise to myself, that I'd
> never contribute code to OpenSSL, so I will not undertake the effort
> of proving myself wrong in this case.
> 
> 
> Best wishes, and happy garbage collection!
> 
> [1] I have not dug into the intern guts of it, and my memory of that
> part of the manual is vague.

The OpenSSL vulnerability I was thinking of is HollowByte, and from July
2026 should be fresh in everyone's memory.  For the few lurkers of comp.
lang.c who don't keep updated with OpenSSL and named vulnerabilities, I
link you the following article,

   https://my-ssl.com/learn/openssl-hollowbyte-vulnerability-2026

and quote the TL;DR.

     HollowByte is the latest OpenSSL vulnerability, disclosed 17 July
     2026. An unauthenticated attacker sends an 11-byte malformed TLS
     ClientHello, and a handshake worker on your server hangs onto the
     socket and its buffer instead of releasing them. Repeat the request
     a few thousand times a second and the server stops accepting new
     HTTPS connections. It affects supported OpenSSL 3.x branches shipped
     before the July 2026 fix. Upgrade the openssl package from your
     distro and restart every daemon that links it — a package update
     alone won't help until you restart the processes. No memory
     disclosure, no key leak, so you do not need to reissue your
     certificate. Behind Cloudflare, an AWS ALB, or an already-patched
     reverse proxy? You're shielded at the edge, but patch the origin
     anyway before the next audit.

     We've walked through this response cycle on production fleets for
     every OpenSSL CVE since Heartbleed. What follows is the checklist we
     actually run — versions, commands, mitigations, and the reissue
     question we get asked every single time.

And while I can't be sure, I'm fairly certain some sort of garbage coll-
ector in the new connection parser [1] would have prevented this.  But
keep in mind OpenSSL has been plagued with memory leaks since its incep-
tion, so it's not like memory usage was high on anyone's priority list.

I mean, didn't Heartbleed happen because people were lazy about memory
boundaries?  Why bother free() with any of the memory, right?  It can
be read later on with the right payload incantation anyway.

So yeah; anyone making a new S.S.L. library from scratch is going to
have to deal with this attack too; and hopefully they'll use some sort
of garbage collection in the new connection parser.



Best wishes, and happy bugs in OpenSSL!


[1] Surely, with a brand new connection, you can reuse the previous att-
emtp when you get more data, right?
-- 
Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | via Easynews.com
https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
Federated at https://fed.brid.gy/bsky/myrkraverk.bsky.social
Technical Details
Message-ID: <YCByS.48195$zKXe.9762@fx12.ams4>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!peer05.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!fx12.ams4.POSTED!not-for-mail
References: <EUBxS.8919$mPXe.2290@fx06.ams4> <20261007182218.446@kylheku.com> <N5cyS.10488$mPXe.6319@fx06.ams4> <20261009133919.155@kylheku.com> <fDcyS.12429$wun8.10981@fx13.ams4>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!peer05.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!fx12.ams4.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: Real world switch () with the MPS memory pool system!
Newsgroups: comp.lang.c,comp.lang.misc,comp.lang.lisp,sci.crypt,netscape.public.mozilla.crypto
References: <EUBxS.8919$mPXe.2290@fx06.ams4> <20261007182218.446@kylheku.com>
 <N5cyS.10488$mPXe.6319@fx06.ams4> <20261009133919.155@kylheku.com>
 <fDcyS.12429$wun8.10981@fx13.ams4>
Content-Language: en-US
From: Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid>
Organization: Watcom Pro Ltd.
In-Reply-To: <fDcyS.12429$wun8.10981@fx13.ams4>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 124
Message-ID: <YCByS.48195$zKXe.9762@fx12.ams4>
X-Complaints-To: abuse@easynews.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Sun, 11 Oct 2026 09:28:23 +0800
X-Received-Bytes: 6860