Sylvain Rochet
cd140b1105
Revert "ppp: fix compiling with CCP_SUPPORT=1 but MPPE_SUPPORT=0"
...
This reverts commit 6e7ea92d56
.
We better forbid building configurations that does not make sense instead
of bloating the code with more ifdef. Here building CCP support without
adding any compressor support serve no real use case.
2020-04-09 03:05:30 +02:00
Hannes Gredler
f36e51e9c9
tcp_out: fix tcp_output_fill_options() arguments
...
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2020-04-02 20:15:58 +02:00
Simon Goldschmidt
003d34eebd
tcp: fix sequence number comparison
...
This fixes both undefined behavior (see bug #51447 ) as well as a possible bug
where sequence numbers in 31 bit distance may come through.
2020-03-27 22:59:05 +01:00
Simon Goldschmidt
e30d50710d
fuzz: allow overriding LWIP_RAND for fuzz tests
...
Fuzz tests need reproducible code, so we need an "unsafe" version of
LWIP_RAND() in this case...
Also, to reproduce fuzz tests cases from Linux on Windows,
LWIP_RAND_FOR_FUZZ_SIMULATE_GLIBC provides the first 20 random numbers that
glibc would have...
2020-03-27 22:42:06 +01:00
Simon Goldschmidt
003f5cc12d
fuzz: whitespace fixes
2020-03-09 21:50:50 +01:00
Simon Goldschmidt
b795784832
fuzz: make CC overridable from 'afl-gcc'
...
e.g. for debugging crashes
2020-03-09 21:40:30 +01:00
Simon Goldschmidt
412c8d1902
fuzz: fix compiler error "missing prototype"
2020-03-08 20:41:53 +01:00
Simon Goldschmidt
34352e9649
altcp: mbedtls: no need for SYS_ARCH locking
2020-03-05 21:48:08 +01:00
Simon Goldschmidt
33f2b313c7
altcp: mbedtls: coding style fixes
2020-03-05 21:45:20 +01:00
Simon Goldschmidt
87618e2f2a
Revert "altcp_tls_mbedtls: ensure configuration is properly freed"
...
This reverts commit d84a84e5ca
.
This commit seemed to be merged in an invalid order
2020-03-05 21:40:23 +01:00
Simon Goldschmidt
21cde5dc9e
altcp: mbedtls: fix compiling altcp_mbedtls_lower_sent()
2020-03-05 21:36:59 +01:00
Simon Goldschmidt
74cd9a8644
ip4: add unit test for ip4addr_aton
2020-03-05 21:28:52 +01:00
Karol Domagalski
2e175a23cb
ip4: ip4addr_aton: fix parsing of the octal IP representation
2020-03-05 21:27:59 +01:00
Simon Goldschmidt
adbc5b5f71
tcp: tighten up checks for received SYN
...
Any malicous segment could contain a SYN up to now (no check).
A SYN in the wrong segment could break OOSEQ queueing.
Fix this by allowing SYN only in states where it is required.
See bug #56397 : Assert "tcp_receive: ooseq tcplen > rcv_wnd"
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2020-03-05 21:20:35 +01:00
Simon Goldschmidt
a02f34a193
fuzz: add pcap output to help debugging fuzz crashes
2020-03-05 21:00:00 +01:00
Simon Goldschmidt
a9052caf10
fuzz: add debug output to help debugging fuzz crashes
2020-03-05 20:49:41 +01:00
Harrold Spier
0192fe773e
Fix allowing negative offset for snmp_pbuf_stream_seek()
...
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2020-02-21 17:28:33 +01:00
Simon Goldschmidt
349c077feb
Fix last commit for all netif loopback traffic
2020-02-21 17:25:51 +01:00
Nick Ballhorn-Wagner
349ec76ee5
fix memory leak in netif_loop_output if tcpip_try_callback fails
...
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2020-02-21 17:17:08 +01:00
Simon Goldschmidt
d05be56a50
fuzz: add more fuzz tests
...
From: Hiromasa Ito <v3hertz@gmail.com>
See bugs #57374-#57380 found by this new test mode.
2020-02-20 21:55:13 +01:00
Simon Goldschmidt
a07e0a82c9
test: split fuzz into different files and binaries
...
This is in preparation to add more fuzzing code...
2020-02-17 22:05:46 +01:00
Simon Goldschmidt
fc85b055d7
sys: add the possibility to fuzz what sys_now() returns
2020-02-17 21:39:46 +01:00
Simon Goldschmidt
9b5a6fe1dc
win32 port: fix LWIP_RAND() being called without sys_init()
...
This can happen in tests...
2020-02-17 21:28:04 +01:00
Simon Goldschmidt
04cf6bbe66
pcapif: add option PCAPIF_RX_READONLY to simulate readonly RX
...
This uses VirtualAlloc/VirtualProtect on windows to simulate RX buffers
that are readonly to lwIP (see task #14807 ).
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2020-02-16 20:43:33 +01:00
Simon Goldschmidt
ea9726056c
and another codespell fix
2020-02-15 21:54:24 +01:00
Simon Goldschmidt
1ffcc5079c
Fix-more-typos-using-codespell
...
Committing nearly all changes done by 'codespell_check.sh -w'
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2020-02-15 21:45:53 +01:00
jona
d6a6b661d9
Fix typos using codespell
...
Conservative strategy was used, maybe other typos remain.
Rebased: Simon Goldschmidt <goldsimon@gmx.de>
2020-02-15 21:45:41 +01:00
Simon Goldschmidt
69c4c8a074
codespell: change file names, add possibility to write changes
...
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2020-02-15 21:45:22 +01:00
jona
8e0c6cd164
Add codespell wrappers : check.sh,changed_files.sh
...
Files adapted from the RIOT project : https://github.com/RIOT-OS/RIOT
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2020-02-15 21:44:49 +01:00
Simon Goldschmidt
6e7ea92d56
ppp: fix compiling with CCP_SUPPORT=1 but MPPE_SUPPORT=0
...
Even if that might not make much sense, it still shouldn't
result in compiler warnings.
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2020-02-15 20:53:47 +01:00
Paul Mackerras
d281d3e959
PPP, EAP: ignore received EAP messages when not doing EAP
...
This adds some basic checks to the subroutines of eap_input to check
that we have requested or agreed to doing EAP authentication before
doing any processing on the received packet. The motivation is to
make it harder for a malicious peer to disrupt the operation of pppd
by sending unsolicited EAP packets. Note that eap_success() already
has a check that the EAP client state is reasonable, and does nothing
(apart from possibly printing a debug message) if not.
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Sylvain Rochet <gradator@gradator.net> (ported to lwIP PPP pcb struct)
2020-02-10 23:37:33 +01:00
Paul Mackerras
2ee3cbe69c
PPP, EAP: fix bounds check in EAP code
...
Given that we have just checked vallen < len, it can never be the case
that vallen >= len + sizeof(rhostname). This fixes the check so we
actually avoid overflowing the rhostname array.
Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Sylvain Rochet <gradator@gradator.net> (compiler warning fix about int vs uint comparisons)
2020-02-10 23:37:25 +01:00
Simon Goldschmidt
5e52d1a4b1
win32: fix 2 compiler warning nits in win32 port
...
Reported-by: Gisle Vanem <gisle.vanem@gmail.com>
2020-02-10 21:55:32 +01:00
Simon Goldschmidt
cc6d5b7a29
ppp: fix compiling eap after changing debug functions
2020-02-06 20:51:02 +01:00
Simon Goldschmidt
d843e47a1d
icmp6: keep to the RFC and send as much as possible with icmp6 error messages
...
See bug 56013
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2020-02-05 20:43:25 +01:00
Simon Goldschmidt
4f30e0daff
httpd: post example: fix typo in last version
...
See bug #57742
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2020-02-04 22:25:04 +01:00
Gao Qingshui
a9ac18aebb
ip6: enable ip6_autoconfig_enabled by default
...
See bug #56135
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2020-02-04 22:23:58 +01:00
Simon Goldschmidt
3034e9fad0
httpd: post example: free pbuf in httpd_post_receive_data
...
See bug #57742
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2020-02-04 22:12:14 +01:00
Simon Goldschmidt
064d816ea1
altcp: fix altcp_tcp_close for LISTEN pcb
...
See bug #55219
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2020-02-03 22:13:07 +01:00
Simon Goldschmidt
84228d4f4b
nd6: cache neighbour index for each next hop, not globally
...
See bug #47792
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2020-02-03 21:53:22 +01:00
Simon Goldschmidt
dc41eabf5f
nd6: check defines for global tables for validity
...
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2020-02-03 21:49:57 +01:00
Simon Goldschmidt
b3046d938e
nd6: use a pointer where appropriate to make the code more readable
...
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2020-02-03 21:33:21 +01:00
Simon Goldschmidt
177bb6ca06
nd6: update addr_hint only if the index has actually changed
2020-02-03 20:57:28 +01:00
Simon Goldschmidt
4c15191b1d
snmp: update documentation
2020-02-03 20:35:22 +01:00
Simon Goldschmidt
5de4967f23
ip4: forward: try to fix the build...
...
... by adding a default case
2020-01-30 23:22:00 +01:00
Simon Goldschmidt
38894637e7
ip4: forward: remove invalid const modifiers
...
This should fix the build...
2020-01-30 23:13:07 +01:00
Simon Goldschmidt
61c67fc229
ip_forward: fix IPv4 forwarding with multiple netifs/offloading
...
When we have multiple netifs where at least one has checksum offloading
capabilities, IP forwarding needs to set various checksum fields to 0
to prevent HW algorithms on calculating an invalid checksum.
-> set checksum fields of IP/UDP/TCP/ICMP to 0 in ip4_forward().
See bug #56288
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2020-01-30 23:02:16 +01:00
Simon Goldschmidt
695c323164
icmp: add a dedicated struct for the standard ICMP header
...
This is just to keep the code clean and prevent using the "echo" header
where any ICMP header is meant.
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2020-01-30 22:50:25 +01:00
Simon Goldschmidt
75b2db4438
makefsdata: error files must start with "<errnr>." to match HTTP status
...
This is to prevent files like "4001.jpg" getting HTTP status 400 instead
of 100.
See bug #56290 .
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2020-01-30 21:22:36 +01:00
Simon Goldschmidt
0f5bf0aa37
httpd: error files must start with "<errnr>." to match HTTP status
...
This is to prevent files like "4001.jpg" getting HTTP status 400 instead
of 100.
See bug #56290 .
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2020-01-30 21:22:03 +01:00