News for hackers. Stuff that matters.
Re:QEMU VM Escape by userbinator on Sunday August 25, 2019 @09:34PM (#20796862)
Looks like this was something that QEMU inherited when it took code from https://en.wikipedia.org/wiki/Slirp . Even after reading that page, I'm still not sure how it works; is it like a SOCKS proxy?
Re:QEMU VM Escape by kijiki on Sunday August 25, 2019 @10:07PM (#20796954)
Slirp is a little like NAT, but implemented differently.

It creates what looks like a virtual NIC (literally in qemu's case, indirectly by SLIP in the original Slirp), and reassembles the packets it gets coming in from the guest OS or SLIP user. For example, a SYN packet gets turned into a call to connect(), and a data packet gets turned into a write() on the appropriate TCP socket FD. An RST packet gets turned into a call to close(). The reverse happens in the other direction, based on the read() data, fake TCP packets are generated, a closed socket gets mapped to a RST packet, and so forth.

From the outside, it looks like the guest (or SLIP user) is NATed through the host's IP address. But really it is just reassembling the intention of the guest based on the packets it is sending and calling host kernel functions to cause the same effects.

Re:QEMU VM Escape by userbinator on Sunday August 25, 2019 @11:10PM (#20797166)
Thanks for the explanation. Given the original purpose of the code, where it would basically see "good" packets exclusively, it's not too surprising that giving it arbitrary "weird" packets could trigger bugs.
Re:QEMU VM Escape by ptman on Monday August 26, 2019 @07:17AM (#20798857)
Is that similar to what sshuttle does?
Re:QEMU VM Escape by dahfizz on Monday August 26, 2019 @10:34AM (#20800187)
Not really. Sshuttle is really just a convenient wrapper around plain old ssh. It created an SSH tunnel to the host you specify and forwards all traffic through that. Its more like a VPN
Re:QEMU VM Escape by peter_tonoli on Sunday August 25, 2019 @09:44PM (#20796882)
Slirp was the equivalent of a userland, and user accessible version of SLIP. It allowed end users, to have IP equivalent connectivity if they had a shell account.

This was in the days when people had dial-in accounts to a shell, and wanted to use Mosaic web browser on their machines.

Re:QEMU VM Escape by jacobush on Monday August 26, 2019 @02:46AM (#20797922)
Amiga Mosaic and FTP, also. :)