If any single byte overflow can be converted into an RCE with minimal human effort then we have no choice but to prove the whole software stack is memory safe.
Ruby2ßhell: Pre-authentication RCE on stock Rails (verialabs.com)
cowlevel 11 hours ago
miohtama 11 hours ago
xnickb 11 hours ago
eecc 11 hours ago
dingaling911 10 hours ago
ecshafer 7 hours ago
anthk 10 hours ago
lionkor 9 hours ago
Now to get people to use them it's an issue.
stouset 3 hours ago
The actual good news is that we have multiple mature languages that entirely remove the need for users to configure and run fuzzers and sanitizers and remember to always obey arcane rules in order to avoid memory corruption.
We’ve been encouraging people to walk, not run, to the exits and switch from C and C++ to memory-safe equivalents. Now it is clear that the time for walking is over and the remaining holdouts should be at the very least jogging if not running.
indemnity 12 minutes ago
I would prefer something be impossible by construction.
There are memory-safe options with little/no performance overhead compared to C/C++.
trismegisti 11 hours ago
zamadatix 10 hours ago
boomlinde 11 hours ago
yuliyp 10 hours ago
tptacek 6 hours ago
(Correct me if I'm wrong!)
jascha_eng 4 hours ago
That's why hiding the POC still helps a bit, because any model probably will require quite a bit of wall clock time to actually build one itself. Then making that work on e.g. a running gitlab instance with other traffic... much harder yet again I'd assume since that should alter memory state without you having control over it.
Still if someone builds an exploit with even 1% success rate they just need to run it on enough instances in parallel and will eventually break through some of them probably.
tptacek 3 hours ago
boomlinde an hour ago
toastal 11 hours ago
jjgreen 10 hours ago
aja12 10 hours ago
zamadatix 10 hours ago
Of course I'm not sure how much it counts to be "using a memory safe language" when you have to call put to unsafe code anyways. I.e. just because the library you'd like to use is C but the rest of your project is Rust doesn't mean you're really using a me ory safe language, it means you're sometimes using one. We have a long way to go before environments allow using memory safety fully I think.
anthk 10 hours ago
dcminter 10 hours ago
The perception of Java as being insecure on the server was only a thing amongst those who hadn't used it much since the Java plugin era.
That's why the Log4j vulnerability was a huge deal.
I like Rust, but this kind of anti-Java-think is super dated and boring.
cowlevel 10 hours ago
hunterpayne 7 hours ago
PS Its the height of irony that the layer protecting Java webservices IS less secure than the Java webservice itself.
PPS The Java memory model is just superior to Rust's in every way...deal with it.
anthk 5 hours ago
You forgot the interpreter itself. Good luck.
tialaramex 4 hours ago
I don't see it. In Safe Rust we can't write a Data Race so we get SC/DRF because we know we don't have a data race. If we write unsafe Rust we do need to be careful not to break the rules and introduce a data race.
In Java we do not get such a promise at all, just the SC/DRF proof, any of our code might race. However, if we do lose Sequential Consistency we still have defined behaviour, we probably no longer understand how our program behaves (if it's not trivial) but we can say e.g. "I didn't write any code to delete the database" and so conclude it doesn't delete the database.
This doesn't seem like a clean win. I can see valuing either proposition more, but "in every way" I don't get that.
ninkendo 10 hours ago
supersimpleguy 8 hours ago
Not everyone on the web is looking to start an argument; some people use literary devices to reinforce their point. If anyone is defensive about a point nobody made, it’s you.
pron 9 hours ago
ekidd 9 hours ago
Now, in web-facing systems, the biggest concern is the low-level crypto libraries, which need to be written in assembly to avoid timing attacks. These (and related libraries) have seen multiple security advisories in the past year, some related to unsafe (I think?) and some related to logic errors. But overall, those advisories have mostly been lower priority, or affected mostly niche use cases.
If you only have a small amount of unsafe code, then it's possible to audit it more aggressively. And there's only a limited amount of space for bugs. So what I would expect for Rust is a trickle of security bugs, many of them niche or low severity, that slows down with time.
vips7L 8 hours ago
tialaramex 7 hours ago
For an example of the latter (LLVM is just nonsense): LLVM still today has a bug found years ago where pointer provenance (a legitimate but hard to think about idea for optimising compilers) accidentally leaks into integers, and so LLVM can end up with two integers a, b which it believes are not equal and yet a - b == 0. Boom.
nsagent 7 hours ago
tialaramex 7 hours ago
... against str::to_uppercase the Rust function which has a single line of unsafe code, with a two line rationale provided to explain why it's OK to do this. As a subject matter expert I agree with the rationale. LGTM.
Edited: We're talking about uppercase, they're basically mirrors, but we should choose the uppercase function.
nsagent 4 hours ago
> It's important to note that Java, like Rust, is generally seen as a memory safe language. But it has bits of assembly, just like Rust has unsafe blocks, to handle some operations.
And according to sources like CISA and the NSA [1], Java is considered memory safe. Furthermore, Rust has been found to have some memory safety issues as well [2]. I think the point to get across is that yes, Rust can help eliminate a very large set of memory safety bugs, but it's prone to issues that other generally considered memory safe languages also have: at some point to do useful work there are going to be unsafe operations. The surface area might be much smaller, so you're likely better off using a memory safe language if you can help it, but it's not a panacea for having layers of security, especially since it means any issue found is likely to affect a large swath of code written in the language because it's in a load bearing area of the language ecosystem.
[1]: https://www.nsa.gov/Press-Room/Press-Releases-Statements/Pre...
[2]: https://www.microsoft.com/en-us/security/blog/2026/11/09/for...
tialaramex 4 hours ago
teaearlgraycold 3 hours ago
jerf 2 hours ago
If so, those are built on unsafe operations internally.
Safety is a lot more complicated than "whether it is in an unsafe block of code in Rust". If you insist that an unsafe primitive can not be handled well enough to become "safe" by some definition of safe then you collapse the entire programming language hierarchy into "everything is completely unsafe". Which may, from a certain point of view, be true, but isn't a particularly useful classification scheme.
afdbcreid 20 minutes ago
pron 7 hours ago
millerm 6 hours ago
pron 5 hours ago
No, it's not. A relatively common case for unsafe in Rust is in data structures. The data structures in the Java runtime are all written in Java and has almost no use of unsafe (there might be a few, but not becsause of language limitation, but because of initialisation order).
As for the JVM, much of it is a compiler. It doesn't matter what language it's written in, as it generates machine code. Indeed, the vulnerability disclosed yesterday was in a compiler intrinsic, but those are just as common in Rust.
Other than that, the other big piece in the JVM is memory management, and it does, indeed, use C and C++ for memory management, but Rust also uses C (the various implementations of malloc/free in whatever runtime the Rust program is using; BTW, some popular malloc/free implementations are almost as big as Java's most complicated GC).
As for native C/C++ libraries (outside the JVM itself), Java programs do use some, but generally not more than Rust programs.
afdbcreid 12 minutes ago
afdbcreid 8 minutes ago
I'm pretty sure that's incorrect by a wide margin, and that all non-nop GCs java has are as large as at least some popular allocators.
gavinray 4 hours ago
afdbcreid 11 minutes ago
InsidiousWombat 7 hours ago
pron 7 hours ago
Thaxll 6 hours ago
afdbcreid 10 minutes ago
insanitybit 5 hours ago
This is silly. Rust also has tooling for dealing with unsafe - tools for proving unsafe code, tools for verifying unsafe code, tools for fuzzing it, etc.
Java, and other languages like it, often drop into unsafe code where it's far weirder and less supported because they have to because the languages are too slow to do the work they want to do.
And obviously you have all of the complexity of a massive, JIT'd runtime written in C++.
pron 5 hours ago
No, that's not been the case for a while, at least since the introduction of VarHandles and FFM (which is why Unsafe is now in the process of being removed altogether). Of course, there's nothing slow in Java code; it compiles like C or C++ or Rust or Zig, sometimes with more aggressive optimisations and sometimes with less aggressive ones. Unsafe mostly used to be used for certain memory operations before VarHandles and FFM.
> And obviously you have all of the complexity of a massive, JIT'd runtime written in C++.
No, that's also inaccurate. The "massive runtime" is largely a compiler (and it doesn't matter what language that's in), and memory management, where the Rust runtime is also about as massive and written in C (the various malloc/free implementations).
empath75 3 hours ago
GTP 8 hours ago
cerved 7 hours ago
jpardoe 6 hours ago
_3u10 9 hours ago
circularfoyers 13 hours ago
djha-skin 28 minutes ago
At what point will we stop considering individual x2shell ultra-critical CVEs news in the age of AI? Like, how many of these are we finding per hour?
barbegal 12 hours ago
deprave 11 hours ago
Exploitation conditions are likely more challenging today but that’s the earliest reference I know for exploiting a single byte overflow.
valleyer 11 hours ago
F30 8 hours ago
enjoytheview 10 hours ago
cyphar 10 hours ago
[1]: https://projectzero.google/2014/08/the-poisoned-nul-byte-201...
tptacek 5 hours ago
It's an evolution of the old "nop sled" idea from stack overflows (and viruses before that), where you don't know exactly what the stack addresses you're targeting are, but you can in your exploit trigger payload include data that will carpet bomb the stack with NOP instructions so that you have a big window to guess.
darkamaul an hour ago
I would be curious to see how they were able to exploit it here.
kyledrake 37 minutes ago
tptacek 15 minutes ago
t1234s 7 hours ago
hunterpayne 6 hours ago
PS There was a movement about multi-lingual/multi-charset programming several decades ago. The international programming community killed it more multiple good reasons. Its not cute, stop doing it.
ok123456 6 hours ago
BigTTYGothGF 5 hours ago
What command? Also perhaps you missed this part of the article:
> The same loop is in several ISO-8859 and Windows-125x encodings and has been there since Ruby 2.4.0. It is reached by upcase, swapcase, downcase(:fold) and casecmp?.
> UTF-8 strings take a different code path and are not affected.
makemefundyou20 5 hours ago
mimischi an hour ago
echoangle 5 hours ago
Yes, but it's always pronounced "sharp" (like the hiss of a snake), so the letter is used to disambiguate some words. In some contexts (switzerland, capital writing until the capital ß was introduced), it's replaced by ss but then there could technically be two meanings, for example "Maße" is measurements and "Masse" is mass, although most of the time it's clear from the context.
t1234s 3 hours ago
t1234s 3 hours ago
Panzerschrek 13 hours ago
rob74 12 hours ago
pwdisswordfishq 11 hours ago
cubefox 11 hours ago
> Traditionally, ⟨ß⟩ did not have a capital form, and was capitalized as ⟨SS⟩. Some type designers introduced capitalized variants. In 2017, the Council for German Orthography officially adopted a capital form ⟨ẞ⟩ as an acceptable variant, ending a long debate.[4] Since 2024 the capital has been preferred over ⟨SS⟩.[5]
shevy-java 11 hours ago
But that is wrong. In german I only know of ß aka downcased version.
ẞ seems another character. I have no idea what it is, other than looking close to ẞ, but it most assuredly is not existing in the german language. There is simply no uppercased variant. 'ss' is "Doppel-s' - that is not ß. In german we have "das" (which is the), but it can be "das" or "dass" depending on the sentence, in particular after a ',' character. I often misspell it, since I prefer "das", when in reality sometimes one has to use "dass". But 'ß' is very different to that - to claim that 'ß' is equivalent to 'ss' is simply incorrect. I have no idea who that "Council for German Orthography" is, but clearly they don't know anything about German. Who put that Council in charge of anything? Are these drunks? The claim that the capital has been preferred, is also factually wrong. Who is writing all that?
Edit: Oh I see, you have that from Wikipedia.
The .pdf can be found here:
https://www.rechtschreibrat.com/DOX/RfdR_Amtliches-Regelwerk...
So from what I can see, this is only the:
"Leibniz-Institut für Deutsche Sprache"
That is not a unified authority for anything. It is totally unclear to me why the wikipedia article claims that this is legally binding for anyone. That's just factually incorrect. Is Wikipedia no longer proofreading?
cubefox 10 hours ago
> I often misspell it, since I prefer "das", when in reality sometimes one has to use "dass".
It's confusing because both can mean "that".
"That is true." = "Das ist wahr."
"He said that it is true." = "Er sagte, dass es wahr ist."
mr_mitm 9 hours ago
Edit: The Leibniz-Institut is just the publisher. The author, the Rat für deutsche Rechtschreibung, is legitimized by the German (and six other countries') government.
The Duden is also seen by many as authoritative and also knows and allows the capital ß: https://www.duden.de/sprachwissen/rechtschreibregeln/doppel-...
Edit 2: It's also not illegal to use whatever made up rules you want. Nothing about this is legally binding anywhere.
edelbitter 9 hours ago
They did not. Participants from Liechtenstein and Switzerland don't even care about that letter (Swiss orthography does not make use of it), so they are not even a good place to begin such debate.
cubefox 5 hours ago
johnp_ 12 hours ago
debugnik 11 hours ago
K0nserv 8 hours ago
From the blog post:
The output buffer is allocated as the input length plus 20 bytes. Each ß adds one byte to the output, so an input with 21 of them overflows the buffer by one byte.weinzierl 12 hours ago
stuxf 12 hours ago
weinzierl 11 hours ago
A quick search showed that there are other cases in legacy encodings that expand to multiple bytes.
For example 0xEF in ISO 6937 expands to CA BC 4E in UTF-8 after case transformation. Similar to ß this is a case with a single byte legacy encoding with a single lowercase unicode codepoint which has no precomposed upper case equivalent.
debugnik 11 hours ago
> Non-ASCII case mapping and folding are supported for UTF-8, UTF-16BE/LE, UTF-32BE/LE, and ISO-8859-1~16 Strings/Symbols.
ß might actually be the only character that expands to multiple bytes on the original encoding from that list of ISO encodings.
weinzierl 11 hours ago
EDIT: Thinking about it, my example from above should work with UTF-16 input.
U+0149 is a single lower case BMP codepoint, so two bytes in UTF-16. It has no precomposed uppercase, so it turns into two codepoints and 4 bytes in UTF-8 and UTF-16.
edelbitter 8 hours ago
1. ÿ (LATIN SMALL LETTER Y WITH DIAERESIS) is in ISO-8859-1, but Ÿ (LATIN CAPITAL LETTER Y WITH DIAERESIS) is not - however, theres this thing called Windows-1252 which is often treated as equivalent, where it is.. but not in the same place as in ISO-8859-15.
2. The Unicode (and correct) uppercase of µ (MICRO SIGN) is Μ (GREEK CAPITAL LETTER MU) which should look like M (LATIN CAPITAL LETTER M) .. only the latter can be expressed in Windows-1252.
3. The ISO-8859-12 encoding is a lie.
tptacek 6 hours ago
GTP 8 hours ago
I think one may now decide to publish the PoC straight away or not publish it at all, since an AI agent pointed at this post would very likely be able to produce one in a few minutes.
speedgoose 12 hours ago
CER10TY 12 hours ago
bloak 11 hours ago
lmz 11 hours ago
roer 9 hours ago
Browsers stopped auto-detecting ISO-2022-JP for this reason.
zelphirkalt 13 hours ago
olejorgenb 9 hours ago
lousken 13 hours ago
wiether 10 hours ago
jaapz 8 hours ago
EDIT: 19.6.0 is now out EDIT2: that version still comes with an unpatched ruby... incredible
wiether 6 hours ago
They released 19.6.0 but it doesn't contains the fixed ruby
And the releases feed don't have 19.6.0 https://docs.gitlab.com/releases/all-releases.xml
neko_ranger 2 hours ago
tvvocold 12 hours ago
rs_rs_rs_rs_rs 13 hours ago
stuxf 13 hours ago
rs_rs_rs_rs_rs 12 hours ago
pluc 10 hours ago
phil294 10 hours ago
jjgreen 10 hours ago
mikrotikker 9 hours ago
jjgreen 5 hours ago
mikrotikker 9 hours ago
He made rails for humans not for speed.
realsdx 11 hours ago
srgb_vs_cmyk 10 hours ago
slekker 8 hours ago
BigTTYGothGF 5 hours ago
sgt 12 hours ago
Gigachad 12 hours ago
pjmlp 12 hours ago
jaapz 8 hours ago
pjmlp 6 hours ago
BigTTYGothGF 5 hours ago
pjmlp 5 hours ago
BigTTYGothGF 3 hours ago
And many of them target a version of python that's at least that old.
> with users
I'm confident they have users, but I don't believe that they exist in quantities beyond, as I said earlier, "a rounding error".
DarkNova6 12 hours ago
Well…
sgt 11 hours ago
imtringued 12 hours ago
jaapz 8 hours ago
gsich 12 hours ago
spikewall 12 hours ago
paulannesley 9 hours ago
spikewall 8 hours ago
phendrenad2 5 hours ago
tguedes 5 hours ago
jerf 2 hours ago
If you are not calibrated with how small a hole it can take to lift a system up into full code execution, I recommend budgeting a couple of hours to spend with https://projectzero.google/2021/12/a-deep-dive-into-nso-zero... and https://projectzero.google/2022/03/forcedentry-sandbox-escap... . I think way too many developers still don't grok what hackers can do, even before AIs. They too often think just in limited terms about the hole itself without understanding where the holes can lead.
I've red teamed some systems locally, and I've found rather a wide variety of issues that I couldn't actually work into a working exploit, either at all or in any reasonable manner that didn't require me to very carefully configure a system in an unrealistic manner just so it could be exploited, but even at a much smaller scale you really just want to fix them rather than worry about them. Defense in depth if nothing else.
stuxf 11 hours ago
would be wildly irresponsible
oguz-ismail2 11 hours ago
I doubt you have a PoC at all
jaxn 8 hours ago