- Sep 13, 2024
-
-
B. Scott Michel authored
-
- Sep 11, 2024
-
-
B. Scott Michel authored
- Fix downcasts with debug-casting.h macros - Fix signed/unsigned mismatches. - Fix warnings.
-
B. Scott Michel authored
Consolidate work-in-progress, bug fixes and improvements. Lots of warning reductions and various cleanups.
-
B. Scott Michel authored
- Add BUILDING_SLIRP to the static library - Ensure SLIRP_EXPORT is consistently used when defining an exported funcion - Add some ISO C safety calls, e.g., strerror_s. - Rabin-Karp string search algorithm for g_strstr_len. Needs a test harness to ensure that it works properly (hint: it does.) - Add "WALL" option to CMakeLists.txt - Add string operations test harness, strops_test.c - Move tests under a tests/ subdirectory. - Find and fix errata. - Add <io.h> for Win32 POSIX-compatible functions, such as open(), close() - Add slirp_os_socket typedef to abstract the network socket type. Unixen use int and Win32 uses SOCKET. - inet_pton for non-Win32.
-
- Aug 04, 2024
-
-
Samuel Thibault authored
bootp: Fill siaddr with tftp addr if supplied as per RFC2131 See merge request slirp/libslirp!135
-
- Jul 30, 2024
-
-
Arusekk authored
Signed-off-by: Arusekk <arek_koz@o2.pl>
-
- Jun 02, 2024
-
-
Samuel Thibault authored
windows: allow static linking with LIBSLIRP_STATIC macro See merge request slirp/libslirp!134
-
- Jun 01, 2024
-
-
Biswapriyo Nath authored
When the macro is defined it will help to link with libslirp statically. Otherwise, dllimport attribute is added with function symbols and linker errors are shown as following for static linking. undefined reference to `__imp_slirp_input' undefined reference to `__imp_slirp_cleanup' undefined reference to `__imp_slirp_remove_hostfwd' etc.
-
- May 12, 2024
-
-
Samuel Thibault authored
-
Samuel Thibault authored
Otherwise e.g. mold complains that it doesn't find all these slirp_* symbols. Fixes #77
-
- May 09, 2024
-
-
Samuel Thibault authored
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- May 06, 2024
-
-
Samuel Thibault authored
Fixes #76
-
- Apr 26, 2024
-
-
Samuel Thibault authored
-
Samuel Thibault authored
-
Samuel Thibault authored
-
Samuel Thibault authored
-
- Apr 25, 2024
-
-
Samuel Thibault authored
-
Samuel Thibault authored
-
Samuel Thibault authored
-
Samuel Thibault authored
Since we increase m->m_len by header_size, we mustn't add header_size again when copying. n->m_len also needs to be subtracted header_size, since we advance n->m_data by header_size. This only had effect for ipv6 trafic with debug builds
-
Samuel Thibault authored
-
Samuel Thibault authored
-
Samuel Thibault authored
-
Samuel Thibault authored
-
Samuel Thibault authored
-
Samuel Thibault authored
Fixes #34
-
Samuel Thibault authored
382bff02 ("Fix possible infinite loops and use-after-free") rewrote the loop to make it cleaner that we go through items, but was always detaching the first elements, which happens to be right, but less clear than detaching the element being processed. Fixes #32 Reported-by: Peter Maydell
-
Samuel Thibault authored
-
Samuel Thibault authored
To avoid leak reports.
-
Samuel Thibault authored
Spotted thanks to ASAN & fuzzing.
-
- Apr 24, 2024
-
-
Samuel Thibault authored
-
Samuel Thibault authored
It's no use sending to the slirp stack the trace packets which are supposed to be generated by the stack. Also no use fuzzing them, then.
-
We don't know in advance what the trace will have received as sequence number, so when fuzzing tcp, just align on what the trace says
-
- by adding trace examples - by separating fuzzing different headers / data - by adding an echo TCP server forward - also factorizing code along the way Also-by: JC <luffy33820@gmail.com> Also-by: Alisee Lafontaine <alisee.lafontaine@u-bordeaux.fr>
-
The slirp_fuzz_ip_header harness should be working and is a basic example of a custom mutator focusing on part of the input. The slirp_fuzz_udp harness needs a bit of work to calculate the checksum properly. The code can be built using `meson build` followed by `ninja -C build`, the current meson.build file is not suitable with a general usage. To run the fuzzing code just run `build/fuzzing/fuzz-ip-header fuzzing/IN -detect_leaks=0`, crash will be sent to current folder and new input will go directly in the `IN` folder. The main point to focus on to improve the fuzzing should be generating a better corpus.
-
You can run the tests over the corpus with a "regular" build, then $ fuzzing/fuzz-input ../fuzzing/IN/* Or building with fuzzing enabled, and running: $ CFLAGS="-fsanitize=fuzzer" CC=clang CXX=clang++ meson -Db_lundef=false $ fuzzing/fuzz-input ../fuzzing/IN I have an initial corpus which was generated by running fuzz-input for a few hours starting with qemu.pkt, which is the first packet sent by qemu. Sadly, it only covers 25%... I tried to increase the coverage manually, see for example tftp-get-blah.pkt, but that's not so simple, as multiple packets may be required to setup a session etc. Neverthess, the fuzzing already found a few issues, so it might be worth to add it in this current form. fuzzing/oss-fuzz.sh is used by oss-fuzz, for Google fuzzing. (see documentation if you want to reproduce the build locally) Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-
Samuel Thibault authored
Spotted thanks to ASAN & fuzzing.
-
Samuel Thibault authored
In case of socket error, we are not consuming the package. So duplicate it after socket operations, once we are sure that we will consume the packet.
-
Samuel Thibault authored
For reassembly, tcpiphdr2qlink needs an additional struct qlink before the tcpiphdr
-
Samuel Thibault authored
As coverity reports, we are not supposed to do anything with a freed pointer, not even assigning it to m. So break the loop before doing so.
-