[PATCH v5 net] rtnetlink: Fix memory(net_device) leak when ->newlink fails

2020-07-15 Thread Weilong Chen
n.c:359 [<6839b4d0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: cb626bf566eb ("net-sysfs: Fix reference count leak") Reported-by: Hulk Robot Signed-off-by: Weilong Chen --- net/core/rtnetlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --

Re: [PATCH v4 net] rtnetlink: Fix memory(net_device) leak when ->newlink fails

2020-07-15 Thread Weilong Chen
On 2020/7/15 13:45, Cong Wang wrote: > On Tue, Jul 14, 2020 at 6:27 PM Weilong Chen wrote: >> >> When vlan_newlink call register_vlan_dev fails, it might return error >> with dev->reg_state = NETREG_UNREGISTERED. The rtnl_newlink should >> free the memory. But curren

[PATCH v4 net] rtnetlink: Fix memory(net_device) leak when ->newlink fails

2020-07-14 Thread Weilong Chen
n.c:359 [<6839b4d0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: e51fb152318ee6 ("rtnetlink: fix a memory leak when ->newlink fails") Reported-by: Hulk Robot Cc: David S. Miller Signed-off-by: Wei Yongjun Signed-off-by: Weilong Chen --- net/core/rtnetlink.c

[PATCH v3 net] rtnetlink: Fix memory(net_device) leak when ->newlink fails

2020-07-14 Thread Weilong Chen
on.c:359 [<6839b4d0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: e51fb152318ee6 (rtnetlink: fix a memory leak when ->newlink fails) Reported-by: Hulk Robot Cc: David S. Miller Signed-off-by: Wei Yongjun Signed-off-by: Weilong Chen --- net/core/rtnetlink.c | 3 ++- 1

[PATCH v2 net] rtnetlink: Fix memory(net_device) leak when ->newlink fails

2020-07-13 Thread Weilong Chen
.c:359 [<6839b4d0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: commit e51fb152318ee6 (rtnetlink: fix a memory leak when ->newlink fails) Cc: David S. Miller Reported-by: Hulk Robot Signed-off-by: Weilong Chen --- net/core/rtnetlink.c | 3 ++- 1 file changed, 2 inser

Re: [PATCH net-next] rtnetlink: Fix memory(net_device) leak when ->newlink fails

2020-07-13 Thread Weilong Chen
On 2020/7/14 3:02, David Miller wrote: > From: Weilong Chen > Date: Mon, 13 Jul 2020 15:55:28 +0800 > >> When vlan_newlink call register_vlan_dev fails, it might return error >> with dev->reg_state = NETREG_UNREGISTERED. The rtnl_newlink should >> free the memory. B

[PATCH net-next] rtnetlink: Fix memory(net_device) leak when ->newlink fails

2020-07-13 Thread Weilong Chen
ket.c:672 [<1c30ffe4>] sys_sendmsg+0x5f5/0x780 net/socket.c:2352 [<b71ca6f3>] ___sys_sendmsg+0x11d/0x1a0 net/socket.c:2406 [<07297384>] __sys_sendmsg+0xeb/0x1b0 net/socket.c:2439 [<0eb29b11>] do_syscall_64+0x56/0xa0 arch/x86/entry/commo

[PATCH net-next v2] ipv4: Add support to disable icmp timestamp

2019-05-13 Thread Weilong Chen
DROP Default is enabled. enable: sysctl -w net.ipv4.icmp_timestamp_enable=1 disable sysctl -w net.ipv4.icmp_timestamp_enable=0 testing: hping3 --icmp --icmp-ts -V $IPADDR Signed-off-by: Weilong Chen --- include/net/ip.h | 2 ++ net/ipv4/icmp.c| 5

[PATCH net-next v2] ipv4: Add support to disable icmp timestamp

2019-05-13 Thread Weilong Chen
DROP Default is enabled. enable: sysctl -w net.ipv4.icmp_timestamp_enable=1 disable sysctl -w net.ipv4.icmp_timestamp_enable=0 testing: hping3 --icmp --icmp-ts -V $IPADDR Signed-off-by: Weilong Chen --- include/net/ip.h | 2 ++ net/ipv4/icmp.c| 5

Re: [PATCH net-next] ipv4: Add support to disable icmp timestamp

2019-05-13 Thread Weilong Chen
On 2019/5/13 20:11, Michal Kubecek wrote: On Mon, May 13, 2019 at 08:06:37PM +0800, Weilong Chen wrote: On 2019/5/13 19:49, Michal Kubecek wrote: One idea is that there may be applications using current time as a seed for random number generator - but then such application is the real problem

Re: [PATCH net-next] ipv4: Add support to disable icmp timestamp

2019-05-13 Thread Weilong Chen
On 2019/5/13 19:49, Michal Kubecek wrote: On Mon, May 13, 2019 at 07:38:37PM +0800, Weilong Chen wrote: On 2019/5/13 15:49, Michal Kubecek wrote: On Mon, May 13, 2019 at 09:33:13AM +0800, Weilong Chen wrote: The remote host answers to an ICMP timestamp request. This allows an attacker to

Re: [PATCH net-next] ipv4: Add support to disable icmp timestamp

2019-05-13 Thread Weilong Chen
On 2019/5/13 15:49, Michal Kubecek wrote: On Mon, May 13, 2019 at 09:33:13AM +0800, Weilong Chen wrote: The remote host answers to an ICMP timestamp request. This allows an attacker to know the time and date on your host. Why is that a problem? If it is, does it also mean that it is a

[PATCH net-next] ipv4: Add support to disable icmp timestamp

2019-05-12 Thread Weilong Chen
DROP Default is disabled to improve security. enable: sysctl -w net.ipv4.icmp_timestamp_enable=1 disable sysctl -w net.ipv4.icmp_timestamp_enable=0 testing: hping3 --icmp --icmp-ts -V $IPADDR Signed-off-by: Weilong Chen --- include/net/ip.h | 2 ++ net/ipv4

Problem of TCP bandwidth drops when change MTU to a small value

2019-01-14 Thread Weilong Chen
Hi, when we change the mtu to a small value, for example, ifconfig eth0 mtu 68, IPERF test shows there's a great bandwidth drop while previous kernel versions don't. Git bisect find the differences is from the patch 28d35bcdd3925e7293408cdb8aa5f2aac5f0d6e3 (net: ipv4: don't let PMTU updates inc

Re: [PATCH net-next] ixgbevf: fix 'Etherleak' in ixgbevf

2016-12-20 Thread Weilong Chen
se to get it up to 60 bytes. - Alex On Tue, Dec 20, 2016 at 3:50 AM, Weilong Chen wrote: Hi, Thanks for you reply. We test you patch, but the problem is still there, it seems do not work. I'm not sure why ixgbe use the limit 17. The kenel use ETH_ZLEN (60) with out FCS. A lot of drivers su

Re: [PATCH net-next] ixgbevf: fix 'Etherleak' in ixgbevf

2016-12-20 Thread Weilong Chen
wrote: On Thu, Dec 15, 2016 at 3:40 AM, Weilong Chen wrote: Nessus report the vf appears to leak memory in network packets. Fix this by padding all small packets manually. And the CVE-2003-0001. https://ofirarkin.files.wordpress.com/2008/11/atstake_etherleak_report.pdf Signed-off-by: Weilong

[PATCH net-next] ixgbevf: fix 'Etherleak' in ixgbevf

2016-12-15 Thread Weilong Chen
Nessus report the vf appears to leak memory in network packets. Fix this by padding all small packets manually. And the CVE-2003-0001. https://ofirarkin.files.wordpress.com/2008/11/atstake_etherleak_report.pdf Signed-off-by: Weilong Chen --- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c

Re: [PATCH net-next] net: Check frag_lists first to prevent data out of order

2015-08-27 Thread Weilong Chen
From: Weilong Chen Date: Fri, 28 Aug 2015 11:35:40 +0800 In my test, @to has a fraglist, but skb_tailroom(to) is not 0! The test is about tipc, the function tipc_buf_append will merge 3 skbs to one: packet 1: len = 1420 skb_tailroom = 190 packet 2: len = 1420 packet 2 will be add to 1

Re: [PATCH net-next] net: Check frag_lists first to prevent data out of order

2015-08-27 Thread Weilong Chen
在 2015/8/28 12:37, Eric Dumazet 写道: On Fri, 2015-08-28 at 11:35 +0800, Weilong Chen wrote: Thanks for reply. On Wed, 2015-08-26 at 19:12 -0700, Eric Dumazet wrote: On Thu, 2015-08-27 at 08:56 +0800, chenweil...@huawei.com wrote: From: Weilong Chen When try to merge several skbs to prior

Re: [PATCH net-next] net: Check frag_lists first to prevent data out of order

2015-08-27 Thread Weilong Chen
Thanks for reply. On Wed, 2015-08-26 at 19:12 -0700, Eric Dumazet wrote: On Thu, 2015-08-27 at 08:56 +0800, chenweil...@huawei.com wrote: From: Weilong Chen When try to merge several skbs to prior one, if the frag_list is used and the the last one is a small packet, once the condition &quo