aboutsummaryrefslogtreecommitdiff
path: root/slirp/Makefile.objs
AgeCommit message (Collapse)Author
2022-09-26Remove the slirp submodule (i.e. compile only with an external libslirp)Thomas Huth
Since QEMU 7.1 we don't support Ubuntu 18.04 anymore, so the last big important Linux distro that did not have a pre-packaged libslirp has been dismissed. All other major distros seem to have a libslirp package in their distribution already - according to repology.org: Fedora 35: 4.6.1 CentOS 8 (RHEL-8): 4.4.0 Debian 11: 4.4.0 OpenSUSE Leap 15.3: 4.3.1 Ubuntu LTS 20.04: 4.1.0 FreeBSD Ports: 4.7.0 NetBSD pkgsrc: 4.7.0 Homebrew: 4.7.0 MSYS2 mingw: 4.7.0 The only one that was still missing a libslirp package is OpenBSD - but the next version (OpenBSD 7.2 which will be shipped in October) is going to include a libslirp package. Since QEMU 7.2 will be published after OpenBSD 7.2, we should be fine there, too. So there is no real urgent need for keeping the slirp submodule in the QEMU tree anymore. Thus let's drop the slirp submodule now and rely on the libslirp packages from the distributions instead. Message-Id: <20220824151122.704946-7-thuth@redhat.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
2022-05-12slirp: bump submodule past 4.7 releasePaolo Bonzini
Version 4.7 of slirp provides a new timer API that works better with CFI, together with several other improvements: * Allow disabling the internal DHCP server !22 * Support Unix sockets in hostfwd !103 * IPv6 DNS proxying support !110 * bootp: add support for UEFI HTTP boot !111 and bugfixes. The submodule update also includes 2 commits to fix warnings in the Win32 build. Reviewed-by: Marc-André Lureau <malureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-08-03Update libslirp to v4.6.1Marc-André Lureau
Switch from stable-4.2 branch to upstream v4.6.1 release + fixes. ## [Unreleased] ### Fixed - Haiku fixes. !98 !99 - Fix a minor DHCP regression introduced in 4.6.0. !97 ## [4.6.1] - 2021-06-18 ### Fixed - Fix DHCP regression introduced in 4.6.0. !95 ## [4.6.0] - 2021-06-14 ### Added - mbuf: Add debugging helpers for allocation. !90 ### Changed - Revert "Set macOS deployment target to macOS 10.4". !93 ### Fixed - mtod()-related buffer overflows (CVE-2021-3592 #44, CVE-2021-3593 #45, CVE-2021-3594 #47, CVE-2021-3595 #46). - poll_fd: add missing fd registration for UDP and ICMP - ncsi: make ncsi_calculate_checksum work with unaligned data. !89 - Various typos and doc fixes. !88 ## [4.5.0] - 2021-05-18 ### Added - IPv6 forwarding. !62 !75 !77 - slirp_neighbor_info() to dump the ARP/NDP tables. !71 ### Changed - Lazy guest address resolution for IPv6. !81 - Improve signal handling when spawning a child. !61 - Set macOS deployment target to macOS 10.4. !72 - slirp_add_hostfwd: Ensure all error paths set errno. !80 - More API documentation. ### Fixed - Assertion failure on unspecified IPv6 address. !86 - Disable polling for PRI on MacOS, fixing some closing streams issues. !73 - Various memory leak fixes on fastq/batchq. !68 - Memory leak on IPv6 fast-send. !67 - Slow socket response on Windows. !64 - Misc build and code cleanups. !60 !63 !76 !79 !84 ## [4.4.0] - 2020-12-02 ### Added - udp, udp6, icmp: handle TTL value. !48 - Enable forwarding ICMP errors. !49 - Add DNS resolving for iOS. !54 ### Changed - Improve meson subproject() support. !53 - Removed Makefile-based build system. !56 ### Fixed - socket: consume empty packets. !55 - check pkt_len before reading protocol header (CVE-2020-29129). !57 - ip_stripoptions use memmove (fixes undefined behaviour). !47 - various Coverity-related changes/fixes. ## [4.3.1] - 2020-07-08 ### Changed - A silent truncation could occur in `slirp_fmt()`, which will now print a critical message. See also #22. ### Fixed - CVE-2020-10756 - Drop bogus IPv6 messages that could lead to data leakage. See !44 and !42. - Fix win32 builds by using the SLIRP_PACKED definition. - Various coverity scan errors fixed. !41 - Fix new GCC warnings. !43 ## [4.3.0] - 2020-04-22 ### Added - `SLIRP_VERSION_STRING` macro, with the git sha suffix when building from git - `SlirpConfig.disable_dns`, to disable DNS redirection #16 ### Changed - `slirp_version_string()` now has the git sha suffix when building form git - Limit DNS redirection to port 53 #16 ### Fixed - Fix build regression with mingw & NetBSD - Fix use-afte-free in `ip_reass()` (CVE-2020-1983) Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Doug Evans <dje@google.com>
2020-11-27slirp: update to fix CVE-2020-29129 CVE-2020-29130Marc-André Lureau
An out-of-bounds access issue was found in the SLIRP user networking implementation of QEMU. It could occur while processing ARP/NCSI packets, if the packet length was shorter than required to accommodate respective protocol headers and payload. A privileged guest user may use this flaw to potentially leak host information bytes. Marc-André Lureau (1): Merge branch 'stable-4.2' into 'stable-4.2' Prasad J Pandit (1): slirp: check pkt_len before reading protocol header Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2020-07-28slirp: update to latest stable-4.2 branchMarc-André Lureau
Dr. David Alan Gilbert (1): ip_stripoptions use memmove Jindrich Novy (4): Fix possible infinite loops and use-after-free Use secure string copy to avoid overflow Be sure to initialize sockaddr structure Check lseek() for failure Marc-André Lureau (2): util: do not silently truncate Merge branch 'stable-4.2' into 'stable-4.2' Philippe Mathieu-Daudé (3): Fix win32 builds by using the SLIRP_PACKED definition Fix constness warnings Remove unnecessary break Ralf Haferkamp (2): Drop bogus IPv6 messages Fix MTU check Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2020-04-21slirp: update to fix CVE-2020-1983Marc-André Lureau
This is an update on the stable-4.2 branch of libslirp.git: git shortlog 55ab21c9a3..2faae0f778f81 Marc-André Lureau (1): Fix use-afte-free in ip_reass() (CVE-2020-1983) CVE-2020-1983 is actually a follow up fix for commit 126c04acbabd7ad32c2b018fe10dfac2a3bc1210 ("Fix heap overflow in ip_reass on big packet input") which was was included in qemu v4.1 (commit e1a4a24d262ba5ac74ea1795adb3ab1cd574c7fb "slirp: update with CVE-2019-14378 fix"). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20200421170227.843555-1-marcandre.lureau@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-03-22slirp: update submodule to v4.2.0+Marc-André Lureau
git shortlog 126c04acbabd7ad32c2b018fe10dfac2a3bc1210..55ab21c9a36852915b81f1b41ebaf3b6509dd8ba 5eraph (1): Use specific outbound IP address Akihiro Suda (8): remove confusing comment that exists from ancient slirp add slirp_new(SlirpConfig *, SlirpCb *, void *) allow custom MTU add disable_host_loopback (prohibit connections to 127.0.0.1) add SlirpConfig version emu: remove dead code emu: disable by default fix a typo in a comment Anders Waldenborg (1): state: fix loading of guestfwd state Giuseppe Scrivano (1): socket: avoid getpeername after shutdown(SHUT_WR) Jindrich Novy (1): Don't leak memory when reallocation fails. Jordi Pujol Palomer (1): fork_exec: correctly parse command lines that contain spaces Marc-André Lureau (60): Merge branch 'AkihiroSuda/libslirp-slirp4netns' Merge branch 'fix-typo' into 'master' meson: make it subproject friendly Merge branch 'meson' into 'master' misc: fix compilation warnings Merge branch 'fix-shutdown-wr' into 'master' sbuf: remove unused and undefined sbcopy() path sbuf: check more strictly sbcopy() bounds with offset sbuf: replace a comment with a runtime warning Replace remaining malloc/free user with glib tcp_attach() can no longer fail state: can't ENOMEM sbuf: use unsigned types sbuf: simplify sbreserve() dnssearch: use g_strv_length() vmstate: silence scan-build warning gitlab-ci: run scan-build Merge branch 'mem-cleanups' into 'master' libslirp.map: bind slirp_new to SLIRP_4.1 version meson: fix libtool versioning Release v4.1.0 Merge branch '4.1.0' into 'master' CHANGELOG: start unreleased section Merge branch 'add-unix' into 'master' util: add G_SIZEOF_MEMBER() macro Check bootp_filename is not going to be truncated bootp: remove extra cast bootp: replace simple snprintf() with strcpy() tftp: clarify what is actually OACK m_len tcp_emu: add more fixme/warnings comments util: add slirp_fmt() helpers dhcpv6: use slirp_fmt() misc: use slirp_fmt0() tftp: use slirp_fmt0() tcp_ctl: use slirp_fmt() tcp_emu: fix unsafe snprintf() usages misc: improve error report Use g_snprintf() util: add gnuc format function attribute to slirp_fmt* Merge branch 'aw-guestfwd-state' into 'master' Merge branch 'slirp-fmt' into 'master' socket: remove extra label and variable socket: factor out sotranslate ipv4/ipv6 handling socket: remove need for extra scope_id variable socket: do not fallback on host loopback if get_dns_addr() failed socket: do not fallback on loopback addr for addresses in our mask/prefix Prepare for v4.2.0 release Merge branch 'translate-fix' into 'master' Merge branch 'release-v4.2.0' into 'master' changelog: post-release changelog: fix link .gitlab-ci: add --werror, treat CI build warnings as errors Revert "socket: remove need for extra scope_id variable" Teach slirp_version_string() to return vcs version Merge branch 'mingw-fix' into 'master' Merge branch 'vcs-version' into 'master' meson: bump required version to 0.49 build-sys: fix NetBSD build regression Merge branch 'netbsd-fix' into 'master' build-sys: make libslirp-version.h depend on Makefile PanNengyuan (1): libslirp: fix NULL pointer dereference in tcp_sockclosed Philippe Mathieu-Daudé (1): Add a git-publish configuration file Prasad J Pandit (4): slirp: ncsi: compute checksum for valid data length slirp: use correct size while emulating IRC commands slirp: use correct size while emulating commands slirp: tftp: restrict relative path access Renzo Davoli (2): Add slirp_remove_guestfwd() Add slirp_add_unix() Samuel Thibault (14): ip_reass: explain why we should not always update the q pointer Merge branch 'comment' into 'master' Merge branch 'no-emu' into 'master' Fix bogus indent, no source change ip_reass: Fix use after free Merge branch 'reass2' into 'master' Make host receive broadcast packets arp: Allow 0.0.0.0 destination address Merge branch 'warnings' into 'master' Merge branch 'arp_0' into 'master' Merge branch 'broadcast' into 'master' tcp_emu: Fix oob access Merge branch 'oob' into 'master' Merge branch 'master' into 'master' Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2019-08-02slirp: update with CVE-2019-14378 fixMarc-André Lureau
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2019-05-09Update upstream slirpSamuel Thibault
Adds gitignore, README file, and fixes ident protocol parsing. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2019-05-04Update slirp submoduleSamuel Thibault
To fix Windows on ARM.
2019-05-03build-sys: move slirp as git submodule projectMarc-André Lureau
The slirp project is now hosted on freedesktop at: https://gitlab.freedesktop.org/slirp. The libslirp source was extracted from qemu/slirp filtered through clang-format (available in project tree). The qemu slirp directory can be swapped by a git submodule. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190424110041.8175-3-marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2019-03-07slirp: remove QEMU Makefile.objsMarc-André Lureau
QEMU no longer includes it, and treats slirp/ as a separate project. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190212162524.31504-8-marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2019-03-07slirp: move sources to src/ subdirectoryMarc-André Lureau
Prepare for making slirp/ a standalone project. Remove some useless includes while at it. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190212162524.31504-5-marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2019-03-07slirp: use "slirp_" prefix for inet_aton() win32 implementationMarc-André Lureau
To avoid conflict with QEMU inet_aton() implementation, let's use the "slirp_" prefix. This allows to drop the WITH_QEMU, thus the source won't make a distinction when building with QEMU or not. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190212162524.31504-4-marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2019-03-07slirp: adapt a subset of QEMU vmstate codeMarc-André Lureau
Add vmstate serialization code adapted from QEMU. Keep only the bits that are required for libslirp. Introduce a IStream/OStream interface to replace QEMU QFile abstraction. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190212162524.31504-2-marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2019-02-07slirp: move QEMU state saving to a separate unitMarc-André Lureau
Make state saving optional: this will allow to build SLIRP without QEMU. (eventually, the vmstate helpers will be extracted, so an external project & process could save its state) Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2019-02-07slirp: replace most qemu socket utilities with slirp own versionMarc-André Lureau
qemu_set_nonblock() is slightly more problematic and will be dealt with in a separate patch. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2019-01-14slirp: set G_LOG_DOMAINMarc-André Lureau
We are moving to g_log() facilities to log errors and probably debug messages too. Let's have the "Slirp" prefix on messages slirp produces. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2019-01-14build-sys: use a separate slirp-obj-y && slirp.moMarc-André Lureau
This will allow to have cflags for the whole slirp.mo -objs. It makes it possible to build tests that links only with slirp-obj-y (and not the whole common-obj). It is also a step towards building slirp as a shared library, although this requires a bit more thoughts to build with net/slirp.o (CONFIG_SLIRP would need to be 'm') and other build issues. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2017-04-25slirp: add a fake NC-SI backendCédric Le Goater
NC-SI (Network Controller Sideband Interface) enables a BMC to manage a set of NICs on a system. This model takes the simplest approach and reverses the NC-SI packets to pretend a NIC is present and exercise the Linux driver. The NCSI header file <ncsi-pkt.h> comes from mainline Linux and was untabified. Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Jason Wang <jasowang@redhat.com>
2016-07-03slirp: Add support for stateless DHCPv6Thomas Huth
Provide basic support for stateless DHCPv6 (see RFC 3736) so that guests can also automatically boot via IPv6 with SLIRP (for IPv6 network booting, see RFC 5970 for details). Tested with: qemu-system-ppc64 -nographic -vga none -boot n -net nic \ -net user,ipv6=yes,ipv4=no,tftp=/path/to/tftp,bootfile=ppc64.img Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2016-03-15slirp: Adding IPv6 UDP supportGuillaume Subiron
This adds the sin6 case in the fhost and lhost unions and related macros. It adds udp6_input() and udp6_output(). It adds the IPv6 case in sorecvfrom(). Finally, udp_input() is called by ip6_input(). Signed-off-by: Guillaume Subiron <maethor@subiron.org> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Thomas Huth <thuth@redhat.com>
2016-03-15slirp: Adding IPv6, ICMPv6 Echo and NDP autoconfigurationGuillaume Subiron
This patch adds the functions needed to handle IPv6 packets. ICMPv6 and NDP headers are implemented. Slirp is now able to send NDP Router or Neighbor Advertisement when it receives Router or Neighbor Solicitation. Using a 64bit-sized IPv6 prefix, the guest is now able to perform stateless autoconfiguration (SLAAC) and to compute its IPv6 address. This patch adds an ndp_table, mainly inspired by arp_table, to keep an NDP cache and manage network address resolution. Slirp regularly sends NDP Neighbor Advertisement, as recommended by the RFC, to make the guest refresh its route. This also adds ip6_cksum() to compute ICMPv6 checksums using IPv6 pseudo-header. Some #define ETH_* are moved upper in slirp.h to make them accessible to other slirp/*.h Signed-off-by: Guillaume Subiron <maethor@subiron.org> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Thomas Huth <thuth@redhat.com>
2012-11-15slirp: Add domain-search option to slirp's DHCP serverKlaus Stengel
This patch will allow the user to include the domain-search option in replies from the built-in DHCP server. The domain suffixes can be specified by adding dnssearch= entries to the "-net user" parameter. [Jan: tiny style adjustments] Signed-off-by: Klaus Stengel <Klaus.Stengel@asamnet.de> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2012-06-07build: move slirp/ objects to nested Makefile.objsPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>