Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. OpenJev(openjev.com ↗)
    80comments
  2. ZCode, the GLM coding agent, silently uploads your Git history(tokenstead.ai ↗)
    6comments
  3. Microsoft exec called AI scraping 'the largest theft of labor in human history'(techcrunch.com ↗)
    124comments
  4. Jemalloc 5.4.0(github.com/jemalloc ↗)
    52comments
  5. The scourge of x86 emulation(fex-emu.com ↗)
    34comments
  6. Astra for Law(openai.com ↗)
    595comments
  7. Bonsai 2 27B: Near-Lossless Compression in a 9x Smaller Footprint(prismml.com ↗)
    139comments
  8. Replacing Pull Requests with Delta(zed.dev ↗)
    12comments
  9. Bend – A language that blocks AI mistakes via proof, on CPU and GPU(bend-lang.com ↗)
    237comments
  10. Qwen 3.8 Omni Flash(qwen.ai ↗)
    84comments
  11. Hister: A private search engine for the pages you visit and the files you keep(github.com/asciimoo ↗)
    170comments
  12. Wax motor(wikipedia.org ↗)
    73comments
  13. When the fractional part of a float fixes your shader(crocidb.com ↗)
    6comments
  14. Fujitsu launches made-in-Japan next-generation CPU FUJITSU-MONAKA(global.fujitsu ↗)
    234comments
  15. Pre-Greek: The lost language hidden within Ancient Greek(linguisticdiscovery.com ↗)
    42comments
  16. Dr Julius Neubronner's Miniature Pigeon Camera(publicdomainreview.org ↗)
    discuss
  17. Warren Buffett Steps Down as Berkshire Chairman, Names Son to Replace Him(nytimes.com ↗)
    4comments
  18. How to Write with an LLM(sockpuppet.org ↗)
    121comments
  19. Google illegally retains customer data,and I am taking legal action against them(medium.com/istokovicsgyorgy79 ↗)
    3comments
  20. A heap overflow and SSO misconfiguration to compromise OpenAI internal repos(hacktron.ai ↗)
    159comments
  21. Shapelearn Qwen 3.8 27B (13.1 GB VRAM)(byteshape.com ↗)
    13comments
  22. Ask A Monk – A digital wilderness for thoughts with no immediate answer(askamonk.online ↗)
    25comments
  23. Flet 1.0 – Build cross-platform apps in Python(flet.dev ↗)
    62comments
  24. Telstra outage: The night a network decided the year was 2006(netnod.se ↗)
    29comments
  25. Diplodocus, Long Thought Exclusively American, Turns Up in Spain(sci.news ↗)
    45comments
  26. Speeding up gearhash on ARM64(sam.dev ↗)
    discuss
  27. Why I didn’t sign the Fields medallists’ letter(gowers.wordpress.com ↗)
    374comments
  28. The most important product decision is what you don't build(liamnugent.me ↗)
    40comments
  29. How do we prevent mathemathics from devolving into the Medieval Era of secrecy?(mathoverflow.net ↗)
    120comments
  30. CrowdSec Source Code Leak(crowdsec.net ↗)
    49comments

QEMU: user-to-root privesc inside VM via bad translation caching

99 pointsby 9y agobugs.chromium.org
28 comments
9y agoHN ↗

To be clear: As far as I know, this bug only affects the TCG mode (without hardware acceleration), not KVM VMs or so.

I wonder what's the reach of that bug.

9y agoHN ↗

As the bug seems to rely on a maximum instruction length that is present in hardware x86 but not in QEMU's x86, the reach of this particular bug seems to be just the software emulated mode.

9y agoHN ↗

Yes, I get that. I was wondering how widely used is qemu in x86 software mode

9y agoHN ↗

It might be used for special applications, but not for your typical server that is connected to the internet, simply because it's horribly slow compared to the virtualization support (VT-x / AMD-V) most modern CPUs offer since at least 2010.

9y agoHN ↗

Right, if you're running on x86 hardware. The use case is probably non-x86 hardware running x86 VMs.

For example, I remember using qemu to emulate RPi with ARM software emulation on my x86 machine.

9y agoHN ↗

Zero. TCG is not considered secure/trusted by any means by the QEMU team, unlike KVM or Xen. It has never received a serious security audit.

9y agoHN ↗

That doesn't mean people don't use it.

Is what you're saying here documented anywhere?

9y agoHN ↗

It's the bit where it says 'is it used in conjunction with a hypervisor?'. That's how we define the use cases that count as defendable against malicious guests.

This covers more than just the TCG cpu emulation because it also means that any device model that can only be used with an emulated CPU is also out of scope for CVEs and hasn't been audited to confirm it has no VM-escape bugs. So the internal documentation of TCG itself isn't really the right place to document this I think.

9y agoHN ↗

Hi, wanted to quickly ask a slightly offtopic question about TCG that I've wondered about for a few years. I was never sure who to ask.

Rob Landley made some small noises about the possibility of leveraging TCG as a successor to tcc (I read about the tinycc/tcc debacle (http://www.landley.net/code/tinycc/) - really sad). I was just curious if such an idea - turning QEMU's code generator into a standalone compiler - is technically feasible in terms of architectural sanity and practical maintainability.

9y agoHN ↗

"However, while real X86 processors have a maximum instruction length of 15 bytes, QEMU's instruction decoder for X86 does not place any limit on the instruction and length or the number of instruction prefixes."

Interesting, and not your usual type of exploit. Guessing this isn't one that will have the Rust crowd doling out "told ya so" :). Logic error only. No buffer overflow, not much strong types do for you, etc.

9y agoHN ↗

Well, look on the bright side: once we eliminate the boring old memory safety bugs, and the XSS, and the SQL injection, the exploits that remain will at least be interesting.

9y agoHN ↗

And they'll have time to deal with them.

9y agoHN ↗

If we remove memory corruption errors, that it already one less class of errors to worry about.

As for the <whatever type safe systems programming language> crowd, these complaints have been done in the past by fairly unknown people like C. A. R. Hoare, Niklaus Wirth, James G. Mitchell, Alan Kay, Luca Cardelli,.... so what do they know about computers.

9y agoHN ↗

If you really wanted to fish for a "told ya so", someone could just point out that by eliminating all of those other classes of bugs, developers could have spent more time looking for logic errors.

9y agoHN ↗

I got that while trolling Rust developers a bit on this point, and had to concede-- it's a fair point.

I do think that rust doesn't (yet) have enough affordances for formal verification of algorithmic correctness-- but if you're not chasing memory safety you have more time to deal with other issues.

9y agoHN ↗

Will you have time for that after fighting the borrow checker?

9y agoHN ↗

If a developer finishes his task he will be given a new task, I don't think you will get a task "go and review our code again for weird logic errors" you will be sent to add a new feature or fix a bug, so you will work on that and create a few new bugs.

9y agoHN ↗

Range checking is done deal with sufficiently strong types (read - dependent types). It was done in the Epigram LONG time ago, ten years ago if not more.

For example, when you fetching bytes for decode you can type-check that you are in the quota and act accordingly.

9y agoHN ↗

Still a developer choice as to what the quota is though, right? That's the logic error here, quota set too high.

9y agoHN ↗

No.

Working with two page quota (as QEMU dev intended) at type level won't allow you to pass through three page (as QEMU code allows and what is exploited).