zephyr/subsys/net/ip
Robert Lubos 6e04a0f59d net: context: Do not overflow net_pkt when using msghdr
If data for `context_sendto()` was provided in a form of
`struct msghdr` (for instance via `sendmsg()`), it was not verified that
the provided data would actually fit into allocated net_pkt. In result,
and error could be returned in case the provided data was larger than
net_pkt allows.

Fix this, by verifying the remaining buffer length when iterating over
`struct msghdr`. Once the buffer is filled up, break the loop. In
result, functions like `sendmsg()` will return the actual length of data
sent instead of an error.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-09-29 11:08:40 +02:00
..
6lo_private.h
6lo.c
6lo.h
canbus_socket.c
canbus_socket.h
CMakeLists.txt net: ipv4: Add IGMPv2 support 2021-04-29 14:49:55 +03:00
connection.c net: icmp: add option to suppress destination unreachable errors. 2021-08-11 11:46:44 +02:00
connection.h
dhcpv4.c net: dhcpv4: Prevent DHCP client from clearing the gateway 2021-06-16 10:40:54 +02:00
dhcpv4.h
icmpv4.c
icmpv4.h
icmpv6.c net: icmpv6: fix net_icmpv6_send_error() dropping packets 2021-09-23 13:21:09 -04:00
icmpv6.h
igmp.c net: if: Add IPv4 support to multicast monitor 2021-09-28 20:04:49 -04:00
ipv4_autoconf_internal.h
ipv4_autoconf.c
ipv4.c net: ipv4: Add IGMPv2 support 2021-04-29 14:49:55 +03:00
ipv4.h net: ipv4: Add IGMPv2 support 2021-04-29 14:49:55 +03:00
ipv6_fragment.c net: ipv6_fragment: send ICMPv6 Time Exceeded upon reassembly timeout 2021-09-23 13:21:09 -04:00
ipv6_mld.c net: if: Add IPv4 support to multicast monitor 2021-09-28 20:04:49 -04:00
ipv6_nbr.c net: ipv6: fix NBR lock initialization 2021-09-14 09:56:37 +02:00
ipv6.c net: ipv6: fix the logics of prev_hdr_offset 2021-09-23 13:21:09 -04:00
ipv6.h net: ip: replace hardcoded NET_IPV6_FRAGMENTS_MAX_PKT with a Kconfig 2021-09-23 13:21:09 -04:00
Kconfig net: ptp: extract PTP interfaces outside gPTP subsys under NET_L2_PTP 2021-09-28 20:01:16 -04:00
Kconfig.debug
Kconfig.ipv4 net: ipv4: Add IGMPv2 support 2021-04-29 14:49:55 +03:00
Kconfig.ipv6 net: ip: replace hardcoded NET_IPV6_FRAGMENTS_MAX_PKT with a Kconfig 2021-09-23 13:21:09 -04:00
Kconfig.mgmt
Kconfig.stack
Kconfig.stats net: stats: Add IGMP statistics support 2021-04-29 14:49:55 +03:00
nbr.c
nbr.h
net_context.c net: context: Do not overflow net_pkt when using msghdr 2021-09-29 11:08:40 +02:00
net_core.c net: Use k_fifo instead of k_work in RX and TX processing 2021-05-07 09:46:44 -05:00
net_if.c net: if: Add IPv4 support to multicast monitor 2021-09-28 20:04:49 -04:00
net_mgmt.c net: mgmt: Initialize the event callbacks statically 2021-05-28 07:00:23 -05:00
net_pkt.c net: ethernet: bridging support 2021-07-21 18:20:01 -04:00
net_private.h net: Use k_fifo instead of k_work in RX and TX processing 2021-05-07 09:46:44 -05:00
net_shell.c net: ip: replace hardcoded NET_IPV6_FRAGMENTS_MAX_PKT with a Kconfig 2021-09-23 13:21:09 -04:00
net_shell.h
net_stats.c
net_stats.h net: stats: Add IGMP statistics support 2021-04-29 14:49:55 +03:00
net_tc_mapping.h
net_tc.c net: Use k_fifo instead of k_work in RX and TX processing 2021-05-07 09:46:44 -05:00
net_timeout.c
packet_socket.c net: ip: packet_socket: fixing raw sckt IPPROTO_RAW usage 2021-09-14 08:37:36 -04:00
packet_socket.h
promiscuous.c
route.c
route.h
tcp2_priv.h
tcp2.c net: tcp: accept [FIN, PSH, ACK] in TCP_FIN_WAIT_2 state 2021-09-09 21:18:25 -04:00
tcp2.h
tcp_internal.h
tp_priv.h
tp.c
tp.h
trickle.c
udp_internal.h
udp.c
utils.c net: ipv4: Add IGMPv2 support 2021-04-29 14:49:55 +03:00