News for hackers. Stuff that matters.
Re:Why does Debian change software? by guappa on Thursday May 22, 2025 @04:19AM (#44059914)
Do you have any statistics that show that Debian patches introduce more CVE worthy bugs than the software already contains? OpenSSL doesn't really have a pristine history.

Let's not forget that the patch had been posted on the OpenSSL mailing list and had received a go ahead comment before that.

Having said that, if you're asking if there's a penetration test team that reviews all the patches. No there isn't. Like there isn't any such thing on 99.999999999% of all software that exists.

Re:Why does Debian change software? by lmm on Thursday May 22, 2025 @07:02AM (#44060827)
The patch was posted on the wrong OpenSSL mailing list, and frankly that particular Debian bug was worse than anything else we've seen even from OpenSSL.

Last I knew Debian didn't do dedicated security review of patches to security-critical software, which is normal practice for other distributions.

Re:Why does Debian change software? by kragen on Thursday May 22, 2025 @07:54AM (#44061143)
It was plausibly the worst computer security bug in human history, but by the same token, it's hard to see it as indicating a systemic problem with either Debian or OpenSSL.
Re:Why does Debian change software? by ak217 on Thursday May 22, 2025 @10:51AM (#44062676)
I think it's important to learn from incidents. It's clear there were design issues on both projects' sides that allowed that bug to happen, and in fact several of them were fixed in subsequent years (though not quickly, and not until major corporate sponsors got concerned about OpenSSL's maintenance).
Re:Why does Debian change software? by kragen on Thursday May 22, 2025 @12:04PM (#44063409)
I agree, but it's not clear that there aren't worse design issues in the alternatives.
Re:Why does Debian change software? by SAI_Peregrinus on Thursday May 22, 2025 @09:11AM (#44061717)
On the other hand it exposed that OpenSSL was depending on Undefined Behavior always working predictably. Something as simple as a GCC update could have had the same effect across far more systems than just Debian, with no patch to OpenSSL itself.
Re:Why does Debian change software? by lmm on Thursday May 22, 2025 @10:08AM (#44062220)
> On the other hand it exposed that OpenSSL was depending on Undefined Behavior always working predictably. Something as simple as a GCC update could have had the same effect across far more systems than just Debian, with no patch to OpenSSL itself.

No it wasn't. It was reading (and xoring into the randomness that would become the key being generated) uninitialised char values from an array whose address was taken, that results in unspecified values not undefined behaviour.

Re:Why does Debian change software? by SAI_Peregrinus on Thursday May 22, 2025 @11:35AM (#44063099)
I see you're correct, I misremembered. That isn't really much better, since there's no requirement that unspecified values ever actually change. Compiler developers are free to always return `0x00` when reading any unspecified `char` value, which wouldn't provide any entropy. XORing it in guaranteed that it couldn't subtract entropy, but if there were no other entropy sources they failed to return an error. OpenSSL being able to generate 0 entropy and not return an error in its RNG was still an important bug to fix.
Re:Why does Debian change software? by lmm on Thursday May 22, 2025 @05:44PM (#44067444)
> XORing it in guaranteed that it couldn't subtract entropy, but if there were no other entropy sources they failed to return an error.

No, they XORed data from a bunch of entropy sources into an intermediate buffer (that was never initialised, because the whole point of it was to be random) and then XORed that into a buffer from which the key was made. Debian's patch removed that final XOR. It wasn't a bug in the original code (other than being hard to understand).

Re:Why does Debian change software? by LtWorf on Thursday May 22, 2025 @01:23PM (#44064313)
Current kernels zero pages. The code was buggy to begin with.
Re:Why does Debian change software? by lmm on Thursday May 22, 2025 @05:45PM (#44067450)
No, there was no bug. The code used an uninitialised array as a place to XOR randomness from various sources into. It didn't initialise the array since there was no value in doing so, because the whole point is to be random anyway.
Re:Why does Debian change software? by LtWorf on Thursday May 22, 2025 @06:39PM (#44067928)
As I said, new kernels zero the pages, an uninitialized area is likely to be zeroed or be rather deterministic.
Re:Why does Debian change software? by lmm on Thursday May 22, 2025 @09:15PM (#44068878)
Which is fine. It's not a bug if it's zero. There's just no point going out of your way to set it to zero when you're only going to xor a bunch of random values into it anyway.
Re:Why does Debian change software? by LtWorf on Friday May 23, 2025 @12:33PM (#44074284)
The whole issue was caused because it was always zero because the patch zeroed it (:

Can you please read about the issue before commenting more?

Re:Why does Debian change software? by lmm on Saturday May 24, 2025 @07:48AM (#44080449)
> The whole issue was caused because it was always zero because the patch zeroed it (:

No it wasn't. The patch removed the read of the randomness buffer that folded it into another buffer (the MD_Update calls) because Valgrind was warning that the buffer it was reading from had never been initialised.

> Can you please read about the issue before commenting more?

Right back at you.

Re:Why does Debian change software? by nullc on Thursday May 22, 2025 @10:23AM (#44062363)
The crazy thing is that after this incident they restored the uninitialized usage and retained it there for the next half decade. It wasn't as mild as being a risk of future compilers destroying the universe: it made valgrind much less useful on essentially all users of OpenSSL, exactly what you want for security critical software.

(meanwhile, long before this incident fedora just compiled openssl with -DPURIFY which disabled the bad behavior in a safe and correct way).

Re:Why does Debian change software? by lifthrasiir on Thursday May 22, 2025 @04:22AM (#44059939)
That was the kind of answer I wanted to hear, thanks. (Of course I don't think Debian should be blamed for incidents.) Does Debian send other patches as well? For example, I didn't know that Debian also often creates a man page by its own.
Re:Why does Debian change software? by pabs3 on Thursday May 22, 2025 @04:51AM (#44060148)
Debian definitely aims to contribute upstream, but that doesn't always happen, due to upstream CLAs, because most Debian packagers are volunteers, many Debian contributors are busy, many upstreams are inactive and other reasons.
Re:Why does Debian change software? by aragilar on Thursday May 22, 2025 @04:32AM (#44060007)
If you go to https://tracker.debian.org/ for any package, it lists patches that need to be sent upstream.
Re:Why does Debian change software? by lifthrasiir on Thursday May 22, 2025 @04:37AM (#44060045)
Ah, I meant more about policies and guidelines. I'm not well-versed in Debian processes so I can for example imagine that only some patches get sent to the upstream only at the maintainers' discretion. It seems that Debian at least has a policy to maintain patches separate from the upstream source though.
Re:Why does Debian change software? by bayindirh on Thursday May 22, 2025 @05:33AM (#44060371)
Debian uses Quilt system for per-package patch maintenance. While packaging a software you get the original source (i.e. orig.tar.gz), and add patches on top of it with Quilt, and build it that way.

Then you run the tests, and if they pass, you package and upload it.

This allows a patch(set) can be sent to the upstream as a package saying "we did this, and if you want to include them, this apply cleanly to version x.y.z, any feedback is welcome".

Re:Why does Debian change software? by guappa on Thursday May 22, 2025 @04:45AM (#44060098)
In theory you want all patches sent to upstream, but if they're for some specific debian reason then you can not send them.

Patches are maintained separately because debian doesn't normally repack the .tar.gz (or whatever) that the projects publish, as to not invalidate signatures and let people check that the file is in fact the same. An exception is done when the project publishes a file that contains files that cannot legally be redistributed.