News for hackers. Stuff that matters.

charleslmunger

Re:Attention people who think UB is fine on Sunday October 25, 2026 @10:44PM (#50238464)
I stand corrected! I had assumed that Fil-C actually removed poison and unreachable states in the IR but thinking about it more that seems very challenging to do comprehensively.
Re:Attention people who think UB is fine on Sunday October 25, 2026 @03:02PM (#50234932)
https://news.ycombinator.com/item?id=46388460

Even if that's the case, it's not "undefined" in the sense that it doesn't permit "now your program is the attacker's program".

Re:Attention people who think UB is fine on Sunday October 25, 2026 @12:46AM (#50228418)
This is sort of true, except that behavior can be undefined in the standard but defined in your implementation. One of the best examples is -fwrapv, which makes signed integer overflow not UB. And Fil-C has no undefined behavior that I'm aware of. But most implementations target the standard and "define" what the standard doesn't to be "whatever I feel like, in service of implementation simplicity and performance". What matters is what your implementation guarantees, which should be a superset of what the standard does.
https://frigate.video

Is a pretty successful open source NVR that used corals when it launched (and many people still use them with it)

Re:C for Rust Programmers on Sunday October 11, 2026 @04:19PM (#50047403)
If you meant standards committee replies, this proposal did pass an along-the-lines vote and is now in wording committee.

My experience with the process as a first time submitter has been pretty pleasant, all things considered.

Re:C for Rust Programmers on Sunday October 11, 2026 @12:19AM (#50039757)
Not nobody! This proposal discusses some of the tradeoffs with exposing the size given a pointer, while proposing a different way to give the true buffer size:

https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3899.pdf

Many fast allocators do not store the size next to the allocation, and may not store the requested size at all. This has the advantage that freeing a large allocation does not fault in cold pages with a write, as well as reducing allocator memory overhead.

Re:Reducing undefined behavior in the C language on Friday October 09, 2026 @12:05AM (#50015858)
Sure. But consider what would happen if you had an array, and you looked up the nth element. If that base address is a null pointer and the index is greater than the size of your zero page reservation, it'll get some other address which is holding stuff. There's ways to deal with that too, of course, but not for free and it carries implications for other things. In Java this is avoided because arrays carry their length at the beginning, and you check that first for bounds, so if the array pointer was null you'd fault a small number of bytes past 0 and it still works.

Fil-C is amazing and a prime example that undefined behavior means implementor freedom, and the implementor can choose to always trap on null pointer use. Sometimes the implementor freedom doesn't buy you much; for example why should it be UB to do

    (const char*)NULL + 1
Dereferencing null is and should be UB but why is just calculating a pointer problematic? I just did some research and some old architectures would actually trap on creating an invalid address. So if we want C to support those machines, the standard can't define the behavior to do something other than what the hardware does.
Re:Revealing the details of how OpenAI agents hacked Hugging Face on Saturday September 26, 2026 @04:35PM (#49860285)
My understanding was that they were running on VMs, and there was at least one container inside the VM. So by breaking out of the container they compromised the VM, but they did not break out of the VM itself. The network isolation was enforced at the container level, so they didn't need to break out of the VM and compromise the hypervisor to move laterally. The technical report says:

>OpenAI also required all Research CaaS workloads to use a micro VM sandbox

So yeah, they were not using it before and they should have been, and they're doing it they way they should have, now.

>exploited insufficient DNS filtering in its sandbox

If your goal is to use dns filtering to prevent your models from reaching the open Internet then you are not really serious about security. People have been tunnelling DNS to get internet access on captive portal wifi since 1998. There's not a lot of details in the blog post but I suspect this was also foreseeable.

Re:Revealing the details of how OpenAI agents hacked Hugging Face on Saturday September 26, 2026 @09:29AM (#49856358)
The parent comment said

>It's also hardly outrageous that they ran training and/or benchmarks with only network-isolated VMs with access to a package repository.

At least in the black hat talk they gave, they said that they noticed that the agents had compromised the package repo, and they remediated it, patched the vulnerability the agents had used, then continued. But given that it was compromised again and they didn't detect it the second time, clearly they did not add monitoring or hardening or comprehensively audit it for further vulnerabilities. My point is that even if there had not been a widely known incident like this yet, that only could excuse the first artifactory compromise, not the second. They had notice because it had already happened to them and they detected it.

As for breaking out of the VM, my point is that the agent should have had to. The comment

>they were running in network-isolated VMs with no access to the internet.

Was not accurate, the network isolation was not done at the VM level.

Re:Revealing the details of how OpenAI agents hacked Hugging Face on Saturday September 26, 2026 @03:59AM (#49854260)
They saw the package repo get hacked once, then did not isolate it further, did not audit it for other issues (using their own models!), did not monitor it after, and baked that behavior into the weights via RL.

They were not in network isolated VMs, from my understanding they used containers sharing a kernel, so a Linux kernel local privilege escalation across the whole syscall surface (there are zillions of these) was sufficient to break out. Breaking xen or firecracker or something would have been much harder, which is why cloud providers running untrusted workloads use them and similar tools. No system is impenetrable but it's not like they were following best practices here.

Re:Size-Specialized Memory Allocation on Friday September 18, 2026 @06:38PM (#49761207)
https://github.com/protocolbuffers/protobuf/commit/50f9ac3ba...

On a sufficiently anemic CPU doing enough fast allocation you can get measurable improvements from that kind of thing, but for a superscalar CPU and a general purpose allocator I agree you'd be hard pressed.

Re:Zig's Io.Threaded Is Neat on Sunday August 23, 2026 @08:06PM (#49413833)
I think that specific issue was a huge mistake, because it means the interruption, which was already messy, is now unusable.

First, you can get deadlocks as interrupt now calls arbitrary code to close channels. Second the interruptee thread cannot recover from an interrupt, if it chooses to to. Lastly it means that a server that shares a file descriptor with multiple threads breaks unrelated operations on interruption.

Re:The August 17 outage, and the work ahead on Saturday August 22, 2026 @09:23PM (#49405442)
It needs a comment for sure. I always write a little helper utility to manage that when I need it.
Re:The August 17 outage, and the work ahead on Friday August 21, 2026 @12:01PM (#49390106)
The first is, annoyingly, a relatively common problem and solution when dealing with GC lifetimes in tests. Few interpreters/JITs want to generate extra instructions to null out stack slots or pre clobber registers to ensure something becomes collectible at a specific point. Eager nulling of a variable often gets removed by dead store elimination or even just from being a disconnected SSA node. I've written extra nested scopes or wrappers in Java to deal with this in tests.

Don't know anything about the second one.

They were not serious about their sandboxing. Bugs in artifactory allowed escape, but they broke out of their Linux namespace/user by exploiting the kernel with an existing public cve. Sharing a kernel like that is not a serious barrier which is why cloud providers user virtualization for customer workloads.

Firecracker avoids sharing the whole kernel, and gvisor drastically reduces the attack surface of the kernel. Breaking through both layers would have been much more challenging and a demonstration of the model's capabilities rather than the sandbox's weakness.

Artifactory is self evidently not a security barrier, and as an exposed network service it should have been audited and after the first issues were found, rejected as a candidate. There's never just one security vulnerability.

And if you want to write a templated data structure without actual templating or fancy macros, doing so with force-iined functions calling function pointers that are constant at the call site is a great way to do it. Unfortunately it's ugly and annoying to do this without nested functions :-/
>today you could set up a system where the whole process is tap two phones together with nfc and confirm

This was actually possible in 2011 or so, and a friend and I implemented it for a school project. How well the ux works depends on whether you want to use a key exchange protocol for the in person communication.

Yes but that space would have existed anyway for a window of that size regardless of its contents.
A weather widget using 8 bit color plus alpha on a 4k display show three full size images in 100mb. But I suspect that's not the ux we're talking about here, and a widget style system has no excuse.
Re:Safe Lock-free Primitives with iceoryx2's ByteAtomic on Friday August 07, 2026 @09:36AM (#49210197)
It's a problem for language specifiers, basically. The behavior is undefined in the standard; to rely on it you either need your implementation of the standard to define it themselves, or you need to bet that there is no possible sequence of machine instructions the compiler could emit that would implement the defined behavior in a way where a data race would do something harmful.

As far as I know there is no reasonable compiler that wasn't specifically trying to add some kind of sanitizer that would emit anything other than plain memory reads, but it would be nice to not have to worry. But sanitizers are handy! I can imagine some sanitizer implementation forgoing extra internal synchronization that would only be needed in the case of program UB anyway.

Re:Safe Lock-free Primitives with iceoryx2's ByteAtomic on Tuesday August 04, 2026 @10:33AM (#49169563)
From a hardware perspective this is correct. From a language perspective it's UB, and unless your compiler has defined that UB, it doesn't matter what the hardware's behavior is unless you're writing assembly.
This is overstated in value; on arm systems with LSE it's faster to use that even for weak operations than to use ll/sc. Even if you are limited to ll/sc the compiler may not put your cas-loop body into the ll/sc region as there's limitations on how many and what type of instructions are permitted there.
Re:Trust your compiler: Modern C++ on Sunday July 05, 2026 @01:48PM (#48796237)
I agree you can't trust your compiler, but you can control its behavior more reliably with __builtin_expect_with_probability

https://github.com/protocolbuffers/protobuf/commit/9f29f02a3...

Re:Right to Local Intelligence on Friday July 03, 2026 @04:39PM (#48779697)
Michael Bloomberg
I mean this is sort of true in that windows is constantly introducing trash, but I've run into all kinds of nonsense:

1. Amd HDMI 2.1 fiasco and adapter workarounds -> debugged the adapter compared to the displayport spec pdf, emailed the company, got a firmware update, patched my kernel. Fixed! This one is going away for good with FRL support upstream soon.

2. Game stops responding to controller input after playing for a bit. Debugged, turns out the service for doing something fancy with shaders has shared fate with the steam input process. It launches a zillion threads and OOMs from virtual memory exhaustion which takes out steam input; fixed by adding a wrapper script for steam that reduces thread stack sizes to the windows default size.

3. Xbox elite series 2 controller back buttons not supported in 2.4ghz wireless mode; reverse engineered the USB packets, contributed support to out of tree xone driver.

4. Flydigi controller software not supported on Linux; find random GitHub project that reversed their hidraw protocol. It's got bugs, so fix them and use it.

5. Terrible banding in Silksong. Set up gamescope to apply dithering; this breaks steam input, figure out all sorts of incantations with LD_PRELOAD

But all of these are very much off the beaten path problems, lots of people have fun with normal controllers, no VRR, etc. My steam deck has been just perfect with zero effort, and I assume that's because I'm not treating the system configuration like a puzzle game.

Re:Everything in C is undefined behavior on Thursday May 21, 2026 @03:52AM (#48219256)
I mean... You can turn a one byte out of bounds write into code execution.

https://daniel.haxx.se/blog/2016/10/14/a-single-byte-write-o...

And if you get code execution, then you by definition have "anything".

Re:Everything in C is undefined behavior on Thursday May 21, 2026 @03:47AM (#48219221)
Isn't the proposal from the parent comment to define the behavior?
Re:Everything in C is undefined behavior on Wednesday May 20, 2026 @11:50AM (#48209736)
I got a measurable improvement from eliminating a null pointer check within the last week. Billions of devices have arm little cores, and the extra branch predictor pressure and frontend bandwidth from those instructions can be significant.

A standard way to eliminate those is to invoke undefined behavior if some condition is not met;

    if (a == NULL) {
      __builtin_unreachable();
    }
Which then allows elimination of the null check in later code, possibly after inlining some function.
Re:Everything in C is undefined behavior on Wednesday May 20, 2026 @11:41AM (#48209597)
Wouldn't that make a compiler that emitted bounds checks violate the standard, since it would not be emitting the actual memory operations if you deref out of bounds?

Older »