Re: [PATCH wpan-next v2 02/11] ieee802154: Internal PAN management

2023-09-17 Thread Alexander Aring
Hi, On Sat, Sep 16, 2023 at 11:39 AM Stefan Schmidt wrote: > > Hello Miquel. > > On 01.09.23 19:04, Miquel Raynal wrote: > > Introduce structures to describe peer devices in a PAN as well as a few > > related helpers. We basically care about: > > - Our unique parent after associating with a coord

Re: [PATCH wpan-next v2 02/11] ieee802154: Internal PAN management

2023-09-18 Thread Alexander Aring
Hi, On Mon, Sep 18, 2023 at 5:01 AM Miquel Raynal wrote: > > Hello, > > aahri...@redhat.com wrote on Sun, 17 Sep 2023 07:50:55 -0400: > > > Hi, > > > > On Sat, Sep 16, 2023 at 11:39 AM Stefan Schmidt > > wrote: > > > > > > Hello Miquel. > > > > > > On 01.09.23 19:04, Miquel Raynal wrote: > > > >

Re: [PATCH wpan-next v2 02/11] ieee802154: Internal PAN management

2023-09-18 Thread Alexander Aring
Hi, On Mon, Sep 18, 2023 at 10:15 AM Miquel Raynal wrote: > > Hi Alexander, > > > > > > > > +// SPDX-License-Identifier: GPL-2.0 > > > > > > +/* > > > > > > + * IEEE 802.15.4 PAN management > > > > > > + * > > > > > > + * Copyright (C) 2021 Qorvo US, Inc > > > > > > + * Authors: > > > > > > + *

[PATCH wpan 2/4] net: ieee802154: fix nl802154 del llsec dev

2021-02-21 Thread Alexander Aring
This patch fixes a nullpointer dereference if NL802154_ATTR_SEC_DEVICE is not set by the user. If this is the case nl802154 will return -EINVAL. Reported-by: syzbot+d946223c2e751d136...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 ++- 1 file

[PATCH wpan 1/4] net: ieee802154: fix nl802154 del llsec key

2021-02-21 Thread Alexander Aring
This patch fixes a nullpointer dereference if NL802154_ATTR_SEC_KEY is not set by the user. If this is the case nl802154 will return -EINVAL. Reported-by: syzbot+ac5c11d2959a8b3c4...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 ++- 1 file changed

[PATCH wpan 3/4] net: ieee802154: fix nl802154 add llsec key

2021-02-21 Thread Alexander Aring
This patch fixes a nullpointer dereference if NL802154_ATTR_SEC_KEY is not set by the user. If this is the case nl802154 will return -EINVAL. Reported-by: syzbot+ce4e062c2d51977dd...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 ++- 1 file changed

[PATCH wpan 4/4] net: ieee802154: fix nl802154 del llsec devkey

2021-02-21 Thread Alexander Aring
This patch fixes a nullpointer dereference if NL802154_ATTR_SEC_DEVKEY is not set by the user. If this is the case nl802154 will return -EINVAL. Reported-by: syzbot+368672e0da240db53...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 ++- 1 file

Re: UBSAN: shift-out-of-bounds in nl802154_new_interface

2021-02-23 Thread Alexander Aring
Hi, On Tue, 23 Feb 2021 at 18:48, Jakub Kicinski wrote: > > Alex, there seems to be a few more syzbot reports for nl802154 beyond > what you posted fixes for. Are you looking at these? Yes, I have it on my list. I will try to fix them at the weekend. - Alex

[PATCH wpan 03/17] net: ieee802154: nl-mac: fix check on panid

2021-02-28 Thread Alexander Aring
This patch fixes a null pointer derefence for panid handle by move the check for the netlink variable directly before accessing them. Reported-by: syzbot+d4c07de0144f6f63b...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/nl-mac.c | 7 --- 1 file changed, 4

[PATCH wpan 05/17] net: ieee802154: stop dump llsec keys for monitors

2021-02-28 Thread Alexander Aring
This patch stops dumping llsec keys for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/ieee802154/nl

[PATCH wpan 06/17] net: ieee802154: forbid monitor for add llsec key

2021-02-28 Thread Alexander Aring
This patch forbids to add llsec key for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/

[PATCH wpan 02/17] net: ieee802154: fix memory leak when deliver monitor skbs

2021-02-28 Thread Alexander Aring
This patch adds a missing consume_skb() when deliver a skb to upper monitor interfaces of a wpan phy. Reported-by: syzbot+44b651863a17760a8...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/mac802154/rx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/mac802154/rx.c

[PATCH wpan 07/17] net: ieee802154: forbid monitor for del llsec key

2021-02-28 Thread Alexander Aring
This patch forbids to del llsec key for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/

[PATCH wpan 08/17] net: ieee802154: stop dump llsec devs for monitors

2021-02-28 Thread Alexander Aring
This patch stops dumping llsec devs for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/ieee802154/nl

[PATCH wpan 04/17] net: ieee802154: forbid monitor for set llsec params

2021-02-28 Thread Alexander Aring
This patch forbids to set llsec params for monitor interfaces which we don't support yet. Reported-by: syzbot+8b6719da8a04beeaf...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee8

[PATCH wpan 12/17] net: ieee802154: forbid monitor for add llsec devkey

2021-02-28 Thread Alexander Aring
This patch forbids to add llsec devkey for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/

[PATCH wpan 09/17] net: ieee802154: forbid monitor for add llsec dev

2021-02-28 Thread Alexander Aring
This patch forbids to add llsec dev for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/

[PATCH wpan 11/17] net: ieee802154: stop dump llsec devkeys for monitors

2021-02-28 Thread Alexander Aring
This patch stops dumping llsec devkeys for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/ieee80215

[PATCH wpan 00/17] ieee802154: syzbot fixes

2021-02-28 Thread Alexander Aring
interfaces yet. We never supported such handling but I can imagine that we can use security mib for monitor interfaces to decrypt 802.15.4 frames by the Linux kernel and the RAW sockets can see plaintext then. However it's a possibility for an new feature to check in due courses. - Alex Alexander

[PATCH wpan 10/17] net: ieee802154: forbid monitor for del llsec dev

2021-02-28 Thread Alexander Aring
This patch forbids to del llsec dev for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/

[PATCH wpan 01/17] net: ieee802154: make shift exponent unsigned

2021-02-28 Thread Alexander Aring
This patch changes the iftype type variable to unsigned that it can never be reach a negative value. Reported-by: syzbot+7bf7b22759195c9a2...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH wpan 14/17] net: ieee802154: stop dump llsec seclevels for monitors

2021-02-28 Thread Alexander Aring
This patch stops dumping llsec seclevels for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/

[PATCH wpan 13/17] net: ieee802154: forbid monitor for del llsec devkey

2021-02-28 Thread Alexander Aring
This patch forbids to del llsec devkey for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/

[PATCH wpan 16/17] net: ieee802154: forbid monitor for del llsec seclevel

2021-02-28 Thread Alexander Aring
This patch forbids to del llsec seclevel for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Reported-by: syzbot+fbf4fc11a819824e0...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/

[PATCH wpan 15/17] net: ieee802154: forbid monitor for add llsec seclevel

2021-02-28 Thread Alexander Aring
This patch forbids to add llsec seclevel for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/

[PATCH wpan 17/17] net: ieee802154: stop dump llsec params for monitors

2021-02-28 Thread Alexander Aring
This patch stops dumping llsec params for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Reported-by: syzbot+cde43a581a8e5f317...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c |

Re: [PATCH wpan 02/17] net: ieee802154: fix memory leak when deliver monitor skbs

2021-02-28 Thread Alexander Aring
Hi Stefan, On Sun, 28 Feb 2021 at 10:21, Alexander Aring wrote: > > This patch adds a missing consume_skb() when deliver a skb to upper > monitor interfaces of a wpan phy. > > Reported-by: syzbot+44b651863a17760a8...@syzkaller.appspotmail.com > Signed-off-by: Alexander A

[PATCH RESEND wpan 01/15] net: ieee802154: nl-mac: fix check on panid

2021-04-04 Thread Alexander Aring
This patch fixes a null pointer derefence for panid handle by move the check for the netlink variable directly before accessing them. Reported-by: syzbot+d4c07de0144f6f63b...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/nl-mac.c | 7 --- 1 file changed, 4

[PATCH RESEND wpan 00/15] net: ieee802154: forbid sec params for monitors

2021-04-04 Thread Alexander Aring
ecurity is not supported yet. However there might be a possibility in future that the kernel will decrypt frames with llsec information for sniffing frames and deliver plaintext to userspace, but this isn't supported yet. - Alex Alexander Aring (15): net: ieee802154: nl-mac: fix check

[PATCH RESEND wpan 02/15] net: ieee802154: forbid monitor for set llsec params

2021-04-04 Thread Alexander Aring
This patch forbids to set llsec params for monitor interfaces which we don't support yet. Reported-by: syzbot+8b6719da8a04beeaf...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee8

[PATCH RESEND wpan 04/15] net: ieee802154: forbid monitor for add llsec key

2021-04-04 Thread Alexander Aring
This patch forbids to add llsec key for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/

[PATCH RESEND wpan 03/15] net: ieee802154: stop dump llsec keys for monitors

2021-04-04 Thread Alexander Aring
This patch stops dumping llsec keys for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/ieee802154/nl

[PATCH RESEND wpan 05/15] net: ieee802154: forbid monitor for del llsec key

2021-04-04 Thread Alexander Aring
This patch forbids to del llsec key for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/

[PATCH RESEND wpan 07/15] net: ieee802154: forbid monitor for add llsec dev

2021-04-04 Thread Alexander Aring
This patch forbids to add llsec dev for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/

[PATCH RESEND wpan 06/15] net: ieee802154: stop dump llsec devs for monitors

2021-04-04 Thread Alexander Aring
This patch stops dumping llsec devs for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/ieee802154/nl

[PATCH RESEND wpan 09/15] net: ieee802154: stop dump llsec devkeys for monitors

2021-04-04 Thread Alexander Aring
This patch stops dumping llsec devkeys for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/ieee80215

[PATCH RESEND wpan 08/15] net: ieee802154: forbid monitor for del llsec dev

2021-04-04 Thread Alexander Aring
This patch forbids to del llsec dev for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/

[PATCH RESEND wpan 11/15] net: ieee802154: forbid monitor for del llsec devkey

2021-04-04 Thread Alexander Aring
This patch forbids to del llsec devkey for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/

[PATCH RESEND wpan 12/15] net: ieee802154: stop dump llsec seclevels for monitors

2021-04-04 Thread Alexander Aring
This patch stops dumping llsec seclevels for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/

[PATCH RESEND wpan 13/15] net: ieee802154: forbid monitor for add llsec seclevel

2021-04-04 Thread Alexander Aring
This patch forbids to add llsec seclevel for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/

[PATCH RESEND wpan 10/15] net: ieee802154: forbid monitor for add llsec devkey

2021-04-04 Thread Alexander Aring
This patch forbids to add llsec devkey for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/

[PATCH RESEND wpan 14/15] net: ieee802154: forbid monitor for del llsec seclevel

2021-04-04 Thread Alexander Aring
This patch forbids to del llsec seclevel for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Reported-by: syzbot+fbf4fc11a819824e0...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/

[PATCH RESEND wpan 15/15] net: ieee802154: stop dump llsec params for monitors

2021-04-04 Thread Alexander Aring
This patch stops dumping llsec params for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Reported-by: syzbot+cde43a581a8e5f317...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c |

Re: [PATCH] net: fix NULL ptr dereference in nl802154_del_llsec_key

2021-04-04 Thread Alexander Aring
Hi, On Sat, 3 Apr 2021 at 11:18, Pavel Skripkin wrote: > > syzbot reported NULL ptr dereference in nl802154_del_llsec_key()[1] > The problem was in case of info->attrs[NL802154_ATTR_SEC_KEY] == NULL. > nla_parse_nested_deprecated()[2] doesn't check this condition before calling > nla_len()[3] >

Re: [PATCH v2] net: mac802154: Fix general protection fault

2021-04-04 Thread Alexander Aring
Hi, On Thu, 4 Mar 2021 at 10:25, Pavel Skripkin wrote: > > syzbot found general protection fault in crypto_destroy_tfm()[1]. > It was caused by wrong clean up loop in llsec_key_alloc(). > If one of the tfm array members is in IS_ERR() range it will > cause general protection fault in clean up fun

Re: [PATCH v2] net: mac802154: Fix general protection fault

2021-04-05 Thread Alexander Aring
; gerrit public mirror. I'm using it to check patches with syzbot. Change > ids are useless outside gerrit, so it shouldn't be here. > > Btw, should I sent v2 or this is already fixed? Otherwise the patch looks good. May Stefan can fix this. Acked-by: Alexander Aring - Alex

Re: [PATCH RESEND wpan 00/15] net: ieee802154: forbid sec params for monitors

2021-04-05 Thread Alexander Aring
Hi, On Sun, 4 Apr 2021 at 20:31, Alexander Aring wrote: > > Hi, > > this patch series contains fixes to forbid various security parameters > settings for monitor types. Monitor types doesn't use the llsec security > currently and we don't support it. With this pat

Re: [PATCH] net: fix shift-out-of-bounds in nl802154_new_interface

2021-04-06 Thread Alexander Aring
Hi, On Mon, 5 Apr 2021 at 15:58, Pavel Skripkin wrote: > > syzbot reported shift-out-of-bounds in nl802154_new_interface. > The problem was in signed representation of enum nl802154_iftype > > enum nl802154_iftype { > /* for backwards compatibility TODO */ > NL802154_IFTYPE_UNSPEC

Re: [PATCH] net: mac802154: fix WARNING in ieee802154_del_device

2021-04-12 Thread Alexander Aring
Hi, On Mon, 12 Apr 2021 at 06:58, Pavel Skripkin wrote: > > syzbot reported WARNING in ieee802154_del_device. The problem > was in uninitialized mutex. In case of NL802154_IFTYPE_MONITOR > mutex won't be initialized, but ieee802154_del_device() accessing it. > > Reported-by: syzbot+bf8b5834b7ec22

Re: [PATCH] net: mac802154: Fix null pointer dereference

2021-03-03 Thread Alexander Aring
Hi, On Wed, 3 Mar 2021 at 11:28, Pavel Skripkin wrote: > > syzbot found general protection fault in crypto_destroy_tfm()[1]. > It was caused by wrong clean up loop in llsec_key_alloc(). > If one of the tfm array members won't be initialized it will cause > NULL dereference in crypto_destroy_tfm()

Re: [PATCH] net: mac802154: Fix null pointer dereference

2021-03-04 Thread Alexander Aring
Hi, On Thu, 4 Mar 2021 at 04:23, Pavel Skripkin wrote: ... > > > > I think this need to be: > > > > if (!IS_ERR_OR_NULL(key->tfm[i])) > > > > otherwise we still run into issues for the current iterator when > > key->tfm[i] is in range of IS_ERR(). > > Oh... I got it completly wrong, I'm sorry. If

[PATCH] netlink.7: note not reliable if NETLINK_NO_ENOBUFS

2021-03-04 Thread Alexander Aring
iable mode. Signed-off-by: Alexander Aring --- man7/netlink.7 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man7/netlink.7 b/man7/netlink.7 index c69bb62bf..2cb0d1a55 100644 --- a/man7/netlink.7 +++ b/man7/netlink.7 @@ -478,7 +478,7 @@ errors. .\"Author: Pablo Nei

[PATCH resend] netlink.7: note not reliable if NETLINK_NO_ENOBUFS

2021-03-04 Thread Alexander Aring
iable mode. Signed-off-by: Alexander Aring --- resend: - forgot linux-man mailinglist in cc, sorry. man7/netlink.7 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man7/netlink.7 b/man7/netlink.7 index c69bb62bf..2cb0d1a55 100644 --- a/man7/netlink.7 +++ b/man7/netlink.7

Re: [PATCH wpan 04/17] net: ieee802154: forbid monitor for set llsec params

2021-03-06 Thread Alexander Aring
Hi, On Thu, 4 Mar 2021 at 02:28, Stefan Schmidt wrote: > > Hello Alex. > > On 28.02.21 16:18, Alexander Aring wrote: > > This patch forbids to set llsec params for monitor interfaces which we > > don't support yet. > > > > Reported-by: syzbot+8b671

Re: [PATCH wpan 01/17] net: ieee802154: make shift exponent unsigned

2021-03-06 Thread Alexander Aring
Hi Stefan, On Thu, 4 Mar 2021 at 02:28, Stefan Schmidt wrote: > > Hello Alex. > > On 28.02.21 16:18, Alexander Aring wrote: > > This patch changes the iftype type variable to unsigned that it can > > never be reach a negative value. > > > > R

Re: [RFC PATCH net-next 1/1] tc-testing: Scapy plugin and JSON verification for tdc

2019-06-24 Thread Alexander Aring
Hi Lucas, On Sun, Jun 09, 2019 at 10:20:32PM -0400, Lucas Bates wrote: > This is a draft version of two new tdc features. > > First, the scapy plugin. This requires the scapy Python module > installed on the system (plugin was tested against v2.4.2). > The intent is to install a given rule (as th

[RFC iproute2 0/1] iproute2 netns mount race issue and solution?

2019-06-26 Thread Alexander Aring
w /var/run/netns works? - Alex Alexander Aring (1): ip: netns: add mounted state file for each netns ip/ipnetns.c | 16 1 file changed, 16 insertions(+) -- 2.11.0

[RFC iproute2 1/1] ip: netns: add mounted state file for each netns

2019-06-26 Thread Alexander Aring
ute2 did a mount bind. Signed-off-by: Alexander Aring --- ip/ipnetns.c | 16 1 file changed, 16 insertions(+) diff --git a/ip/ipnetns.c b/ip/ipnetns.c index a883f210..339a9ffc 100644 --- a/ip/ipnetns.c +++ b/ip/ipnetns.c @@ -606,6 +606,13 @@ static int on_netns_del(char *nsname,

struct stack initialization and padding bits

2018-04-27 Thread Alexander Aring
Hi, I currently struggle with an issue with latest changes in inet_frag api. I struggle at two points [0] which do a struct stack initialization and [1] who do a memcmp() on this structure. The struct "frag_lowpan_compare_key" has padding bits which are in my case of system and compiler random in

net namespaces kernel stack overflow

2018-04-18 Thread Alexander Aring
Hi, I currently can crash my net/master kernel by execute the following script: --- snip modprobe dummy #mkdir /var/run/netns #touch /var/run/netns/init_net #mount --bind /proc/1/ns/net /var/run/netns/init_net while true do mkdir /var/run/netns touch /var/run/netns/init_net mount -

[PATCH net 2/3] net: sched: ife: handle malformed tlv length

2018-04-18 Thread Alexander Aring
There is currently no handling to check on a invalid tlv length. This patch adds such handling to avoid killing the kernel with a malformed ife packet. Signed-off-by: Alexander Aring --- include/net/ife.h | 3 ++- net/ife/ife.c | 35 +-- net/sched

[PATCH net 0/3] net: sched: ife: malformed ife packet fixes

2018-04-18 Thread Alexander Aring
. With fuzzy testing I was able to craft certain malformed packets that IFE action was not able to deal with. This patch set fixes those bugs. Alexander Aring (3): net: sched: ife: signal not finding metaid net: sched: ife: handle malformed tlv length net: sched: ife: check on metadata length

[PATCH net 3/3] net: sched: ife: check on metadata length

2018-04-18 Thread Alexander Aring
This patch checks if sk buffer is available to dererence ife header. If not then NULL will returned to signal an malformed ife packet. This avoids to crashing the kernel from outside. Signed-off-by: Alexander Aring --- net/ife/ife.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ife

[PATCH net 1/3] net: sched: ife: signal not finding metaid

2018-04-18 Thread Alexander Aring
We need to record stats for received metadata that we dont know how to process. Have find_decode_metaid() return -ENOENT to capture this. Signed-off-by: Alexander Aring --- net/sched/act_ife.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/act_ife.c b/net/sched

Re: [bisected] Stack overflow after fs: "switch the IO-triggering parts of umount to fs_pin" (was net namespaces kernel stack overflow)

2018-04-19 Thread Alexander Aring
y for the stuff created by SB_KERNMOUNT mounts, *not* for >> their copies. >> >> Cc: sta...@kernel.org >> Signed-off-by: Al Viro > > Flawless victory! Thanks. > Thanks to all. Also thanks to Kirill for helping me here and doing the main part by bisecting this issue. Finally, my testing stuff which produced this bug also works well now. Tested-by: Alexander Aring - Alex

[PATCHv2 net 2/3] net: sched: ife: handle malformed tlv length

2018-04-19 Thread Alexander Aring
There is currently no handling to check on a invalid tlv length. This patch adds such handling to avoid killing the kernel with a malformed ife packet. Signed-off-by: Alexander Aring Reviewed-by: Yotam Gigi Acked-by: Jamal Hadi Salim --- include/net/ife.h | 3 ++- net/ife/ife.c | 35

[PATCHv2 net 0/3] net: sched: ife: malformed ife packet fixes

2018-04-19 Thread Alexander Aring
. With fuzzy testing I was able to craft certain malformed packets that IFE action was not able to deal with. This patch set fixes those bugs. changes since v2: - remove inline from __ife_tlv_meta_valid - add const to cast to meta_tlvhdr - add acked and reviewed tags Alexander Aring (3): net

[PATCHv2 net 1/3] net: sched: ife: signal not finding metaid

2018-04-19 Thread Alexander Aring
We need to record stats for received metadata that we dont know how to process. Have find_decode_metaid() return -ENOENT to capture this. Signed-off-by: Alexander Aring Reviewed-by: Yotam Gigi Acked-by: Jamal Hadi Salim --- net/sched/act_ife.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCHv2 net 3/3] net: sched: ife: check on metadata length

2018-04-19 Thread Alexander Aring
This patch checks if sk buffer is available to dererence ife header. If not then NULL will returned to signal an malformed ife packet. This avoids to crashing the kernel from outside. Signed-off-by: Alexander Aring Reviewed-by: Yotam Gigi Acked-by: Jamal Hadi Salim --- net/ife/ife.c | 3

[PATCHv3 net 0/3] net: sched: ife: malformed ife packet fixes

2018-04-19 Thread Alexander Aring
reviewed tags Alexander Aring (3): net: sched: ife: signal not finding metaid net: sched: ife: handle malformed tlv length net: sched: ife: check on metadata length include/net/ife.h | 3 ++- net/ife/ife.c | 38 -- net/sched/act_ife.c | 9

[PATCHv3 net 3/3] net: sched: ife: check on metadata length

2018-04-19 Thread Alexander Aring
This patch checks if sk buffer is available to dererence ife header. If not then NULL will returned to signal an malformed ife packet. This avoids to crashing the kernel from outside. Signed-off-by: Alexander Aring Reviewed-by: Yotam Gigi Acked-by: Jamal Hadi Salim --- net/ife/ife.c | 3

[PATCHv3 net 1/3] net: sched: ife: signal not finding metaid

2018-04-19 Thread Alexander Aring
We need to record stats for received metadata that we dont know how to process. Have find_decode_metaid() return -ENOENT to capture this. Signed-off-by: Alexander Aring Reviewed-by: Yotam Gigi Acked-by: Jamal Hadi Salim --- net/sched/act_ife.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCHv3 net 2/3] net: sched: ife: handle malformed tlv length

2018-04-19 Thread Alexander Aring
There is currently no handling to check on a invalid tlv length. This patch adds such handling to avoid killing the kernel with a malformed ife packet. Signed-off-by: Alexander Aring Reviewed-by: Yotam Gigi Acked-by: Jamal Hadi Salim --- include/net/ife.h | 3 ++- net/ife/ife.c | 35

[PATCHv4 net 0/3] net: sched: ife: malformed ife packet fixes

2018-04-20 Thread Alexander Aring
__ife_tlv_meta_valid - add const to cast to meta_tlvhdr - add acked and reviewed tags Alexander Aring (3): net: sched: ife: signal not finding metaid net: sched: ife: handle malformed tlv length net: sched: ife: check on metadata length include/net/ife.h | 3 ++- net/ife/ife.c | 38

[PATCHv4 net 2/3] net: sched: ife: handle malformed tlv length

2018-04-20 Thread Alexander Aring
There is currently no handling to check on a invalid tlv length. This patch adds such handling to avoid killing the kernel with a malformed ife packet. Signed-off-by: Alexander Aring Reviewed-by: Yotam Gigi Acked-by: Jamal Hadi Salim --- include/net/ife.h | 3 ++- net/ife/ife.c | 35

[PATCHv4 net 3/3] net: sched: ife: check on metadata length

2018-04-20 Thread Alexander Aring
This patch checks if sk buffer is available to dererence ife header. If not then NULL will returned to signal an malformed ife packet. This avoids to crashing the kernel from outside. Signed-off-by: Alexander Aring Reviewed-by: Yotam Gigi Acked-by: Jamal Hadi Salim --- net/ife/ife.c | 3

[PATCHv4 net 1/3] net: sched: ife: signal not finding metaid

2018-04-20 Thread Alexander Aring
We need to record stats for received metadata that we dont know how to process. Have find_decode_metaid() return -ENOENT to capture this. Signed-off-by: Alexander Aring Reviewed-by: Yotam Gigi Acked-by: Jamal Hadi Salim --- net/sched/act_ife.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [RFC iproute2] netns: add mounting state file for each netns

2019-07-01 Thread Alexander Aring
Hi Matteo, On Sun, Jun 30, 2019 at 09:29:33PM +0200, Matteo Croce wrote: > When ip creates a netns, there is a small time interval between the > placeholder file creation in NETNS_RUN_DIR and the bind mount from /proc. > > Add a temporary file named .mounting-$netns which gets deleted after the >

Re: [PATCH v2 net-next 1/3] tc-testing: Add JSON verification to tdc

2019-07-04 Thread Alexander Aring
Hi, On Wed, Jul 03, 2019 at 08:45:00PM -0400, Lucas Bates wrote: > This patch allows tdc to process JSON output to perform secondary > verification of the command under test. If the verifyCmd generates > JSON, one can provide the 'matchJSON' key to process it > instead of a regex. > > matchJSON h

Re: [PATCH v2 net-next 3/3] tc-testing: introduce scapyPlugin for basic traffic

2019-07-04 Thread Alexander Aring
Hi, On Wed, Jul 03, 2019 at 08:45:02PM -0400, Lucas Bates wrote: > The scapyPlugin allows for simple traffic generation in tdc to > test various tc features. It was tested with scapy v2.4.2, but > should work with any successive version. > > In order to use the plugin's functionality, scapy must

Re: [PATCH v2 net-next 1/3] tc-testing: Add JSON verification to tdc

2019-07-08 Thread Alexander Aring
Hi, On Mon, Jul 08, 2019 at 12:48:12PM -0400, Lucas Bates wrote: > On Thu, Jul 4, 2019 at 4:21 PM Alexander Aring wrote: > > > why you just use eval() as pattern matching operation and let the user > > define how to declare a matching mechanism instead you introduce another &

Re: [PATCH v2 net-next 3/3] tc-testing: introduce scapyPlugin for basic traffic

2019-07-09 Thread Alexander Aring
On Mon, Jul 08, 2019 at 09:28:09PM -0400, Lucas Bates wrote: > Sorry Alex, I completely forgot about this email. > On Thu, Jul 4, 2019 at 4:29 PM Alexander Aring wrote: > > > > Hi, > > > > On Wed, Jul 03, 2019 at 08:45:02PM -0400, Lucas Bates wrote: > > > Th

[PATCH net-next 0/3] tc: act_ife: handle IEEE IFE ethertype as default

2017-08-28 Thread Alexander Aring
. - Alex Alexander Aring (3): if_ether: add forces ife lfb type act_ife: use registered ife_type as fallback tc-testing: add test for testing ife type include/uapi/linux/if_ether.h | 1 + net/sched/act_ife.c| 17 ++-- .../tc-testing

[PATCH net-next 1/3] if_ether: add forces ife lfb type

2017-08-28 Thread Alexander Aring
CES" which is a spelling error inside the IEEE ethertype specification. Signed-off-by: Alexander Aring --- include/uapi/linux/if_ether.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h index 5bc9bfd816b7..22bf8effefef 100644 ---

[PATCH net-next 2/3] act_ife: use registered ife_type as fallback

2017-08-28 Thread Alexander Aring
This patch handles a default IFE type if it's not given by user space netlink api. The default IFE type will be the registered ethertype by IEEE for IFE ForCES. Signed-off-by: Alexander Aring --- net/sched/act_ife.c | 17 +++-- 1 file changed, 3 insertions(+), 14 deletions(-)

[PATCH net-next 3/3] tc-testing: add test for testing ife type

2017-08-28 Thread Alexander Aring
This patch adds a new testcase for the IFE type setting in tc. In case of user specified the type it will check if the ife is correctly configured to react on it. If it's not specified the default IFE type should be used. Signed-off-by: Alexander Aring --- .../tc-testing/tc-tests/ac

[PATCH iproute2 0/4] tc: m_ife: handle IFE ethertype value

2017-08-28 Thread Alexander Aring
tc-ife. Note: Please wait until the related kernel patches comes in. This patch series contains an UAPI change which need to be accepted by netdev at first. Thanks. - Alex Alexander Aring (4): tc: m_ife: allow ife type to zero tc: m_ife: print IEEE ethertype format tc: m_ife: report about

[PATCH iproute2 2/4] tc: m_ife: print IEEE ethertype format

2017-08-28 Thread Alexander Aring
This patch uses the usually IEEE format to display an ethertype which is 4-digits and every digit in upper case. Signed-off-by: Alexander Aring --- tc/m_ife.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/m_ife.c b/tc/m_ife.c index e05e2276..7b57130e 100644 --- a/tc

ANNOUNCE: rpld an another RPL implementation for Linux

2019-08-29 Thread Alexander Aring
Hi, I had some free time, I wanted to know how RPL [0] works so I did a implementation. It's _very_ basic as it only gives you a "routable" (is that a word?) thing afterwards in a very constrained setup of RPL messages. Took ~1 month to implement it and I reused some great code from radvd [1]. I

[RFC net 0/1] net: sched: act: fix rcu race

2017-10-10 Thread Alexander Aring
r in other tc actions where code was just copy&pasted. The problem because nobody hits this issue is, I think that dump will do alot of previous stuff which took more time than a rcu_synchronize. Anyway, this change should avoid any use after free issues etc. - Alex Alexander Aring (1): n

[RFC net 1/1] net: sched: act: fix rcu race in dump

2017-10-10 Thread Alexander Aring
params B - dump params \--> will dump params A This could be a unlikely case that the last rcu_assign_pointer was not happened before dump callback. Signed-off-by: Alexander Aring --- net/sched/act_skbmod.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/net/sc

Re: [RFC net 1/1] net: sched: act: fix rcu race in dump

2017-10-10 Thread Alexander Aring
Hi, On Tue, Oct 10, 2017 at 8:32 AM, Alexander Aring wrote: > This patch fixes an issue with kfree_rcu which is not protected by RTNL > lock. It could be that the current assigned rcu pointer will be freed by > kfree_rcu while dump callback is running. > > To preven

Re: [RFC net 1/1] net: sched: act: fix rcu race in dump

2017-10-10 Thread Alexander Aring
Hi, On Tue, Oct 10, 2017 at 10:12 AM, Eric Dumazet wrote: > On Tue, 2017-10-10 at 08:32 -0400, Alexander Aring wrote: >> This patch fixes an issue with kfree_rcu which is not protected by RTNL >> lock. It could be that the current assigned rcu pointer will be freed by >>

[PATCH net-next 2/3] sched: act: ife: migrate to use per-cpu counters

2017-10-11 Thread Alexander Aring
This patch migrates the current counter handling which is protected by a spinlock to a per-cpu counter handling. This reduce the time where the spinlock is being held. Signed-off-by: Alexander Aring --- net/sched/act_ife.c | 29 +++-- 1 file changed, 11 insertions(+), 18

[PATCH net-next 3/3] sched: act: ife: update parameters via rcu handling

2017-10-11 Thread Alexander Aring
This patch changes the parameter updating via RCU and not protected by a spinlock anymore. This reduce the time that the spinlock is being held. Signed-off-by: Alexander Aring --- include/net/tc_act/tc_ife.h | 10 -- net/sched/act_ife.c | 87

[PATCH net-next 0/3] sched: act: ife: UAPI checks and performance tweaks

2017-10-11 Thread Alexander Aring
. - I use still dereference in dump callback, so I think what I didn't got was what happened when rcu_assign_pointer will do when rcu read lock is held. I suppose the pointer will be updated, then we don't have any issue here. Alexander Aring (3): sched: act: ife: move enc

[PATCH net-next 1/3] sched: act: ife: move encode/decode check to init

2017-10-11 Thread Alexander Aring
This patch adds the check of the two possible ife handlings encode and decode to the init callback. The decode value is for usability aspect and used in userspace code only. The current code offers encode else decode only. This patch avoids any other option than this. Signed-off-by: Alexander

routing UAPI mismatch invalid state behavior?

2017-10-15 Thread Alexander Aring
Hi, I figure out some problem, easy to reproduce: # setup dummy $ modprobe dummy $ ip link set dummy0 up # issue $ ip route replace default via 169.254.65.37 dev dummy0 RTNETLINK answers: Network is unreachable so it will forbid me to do that, but: $ ip route replace 169.254.65.37 dev dummy0 $

[PATCH wpan 2/2] net: mac802154: tx: expand tailroom if necessary

2018-07-02 Thread Alexander Aring
This patch is necessary if case of AF_PACKET or other socket interface which I am aware of it and didn't allocated the necessary room. Reported-by: David Palma Reported-by: Rabi Narayan Sahoo Signed-off-by: Alexander Aring --- net/mac802154/tx.c | 15 ++- 1 file change

[PATCH wpan 1/2] net: 6lowpan: fix reserved space for single frames

2018-07-02 Thread Alexander Aring
: https://bugzilla.kernel.org/show_bug.cgi?id=195059 Reported-by: David Palma Reported-by: Rabi Narayan Sahoo Signed-off-by: Alexander Aring --- net/ieee802154/6lowpan/tx.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/net/ieee802154/6lowpan/tx.c b/net

  1   2   3   4   5   >