* Re: [PATCH net-next v1 1/2] net: Update bhash2 when socket's rcv saddr changes @ 2022-05-31 22:04 ` Eric Dumazet 0 siblings, 0 replies; 6+ messages in thread From: Eric Dumazet @ 2022-05-31 22:04 UTC (permalink / raw) To: Joanne Koong Cc: netdev, kafai, kuba, davem, richard_siegfried, dsahern, pabeni, yoshfuji, kuniyu, dccp, testing, syzbot+015d756bbd1f8b5c8f09 On Tue, May 24, 2022 at 4:20 PM Joanne Koong <joannelkoong@gmail.com> wrote: > > Commit d5a42de8bdbe ("net: Add a second bind table hashed by port and > address") added a second bind table, bhash2, that hashes by a socket's port > and rcv address. > > However, there are two cases where the socket's rcv saddr can change > after it has been binded: > > 1) The case where there is a bind() call on "::" (IPADDR_ANY) and then > a connect() call. The kernel will assign the socket an address when it > handles the connect() > > 2) In inet_sk_reselect_saddr(), which is called when rerouting fails > when rebuilding the sk header (invoked by inet_sk_rebuild_header) > > In these two cases, we need to update the bhash2 table by removing the > entry for the old address, and adding a new entry reflecting the updated > address. > > Reported-by: syzbot+015d756bbd1f8b5c8f09@syzkaller.appspotmail.com > Fixes: d5a42de8bdbe ("net: Add a second bind table hashed by port and address") > Signed-off-by: Joanne Koong <joannelkoong@gmail.com> > --- Reviewed-by: Eric Dumazet <edumzet@google.com> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next v1 1/2] net: Update bhash2 when socket's rcv saddr changes @ 2022-05-31 22:04 ` Eric Dumazet 0 siblings, 0 replies; 6+ messages in thread From: Eric Dumazet @ 2022-05-31 22:04 UTC (permalink / raw) To: dccp On Tue, May 24, 2022 at 4:20 PM Joanne Koong <joannelkoong@gmail.com> wrote: > > Commit d5a42de8bdbe ("net: Add a second bind table hashed by port and > address") added a second bind table, bhash2, that hashes by a socket's port > and rcv address. > > However, there are two cases where the socket's rcv saddr can change > after it has been binded: > > 1) The case where there is a bind() call on "::" (IPADDR_ANY) and then > a connect() call. The kernel will assign the socket an address when it > handles the connect() > > 2) In inet_sk_reselect_saddr(), which is called when rerouting fails > when rebuilding the sk header (invoked by inet_sk_rebuild_header) > > In these two cases, we need to update the bhash2 table by removing the > entry for the old address, and adding a new entry reflecting the updated > address. > > Reported-by: syzbot+015d756bbd1f8b5c8f09@syzkaller.appspotmail.com > Fixes: d5a42de8bdbe ("net: Add a second bind table hashed by port and address") > Signed-off-by: Joanne Koong <joannelkoong@gmail.com> > --- Reviewed-by: Eric Dumazet <edumzet@google.com> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next v1 1/2] net: Update bhash2 when socket's rcv saddr changes 2022-05-31 22:04 ` Eric Dumazet @ 2022-06-01 9:58 ` Paolo Abeni -1 siblings, 0 replies; 6+ messages in thread From: Paolo Abeni @ 2022-06-01 9:58 UTC (permalink / raw) To: Eric Dumazet, Joanne Koong Cc: netdev, kafai, kuba, davem, richard_siegfried, dsahern, yoshfuji, kuniyu, dccp, testing, syzbot+015d756bbd1f8b5c8f09 Hello, On Tue, 2022-05-31 at 15:04 -0700, Eric Dumazet wrote: > On Tue, May 24, 2022 at 4:20 PM Joanne Koong <joannelkoong@gmail.com> wrote: > > > > Commit d5a42de8bdbe ("net: Add a second bind table hashed by port and > > address") added a second bind table, bhash2, that hashes by a socket's port > > and rcv address. > > > > However, there are two cases where the socket's rcv saddr can change > > after it has been binded: > > > > 1) The case where there is a bind() call on "::" (IPADDR_ANY) and then > > a connect() call. The kernel will assign the socket an address when it > > handles the connect() > > > > 2) In inet_sk_reselect_saddr(), which is called when rerouting fails > > when rebuilding the sk header (invoked by inet_sk_rebuild_header) > > > > In these two cases, we need to update the bhash2 table by removing the > > entry for the old address, and adding a new entry reflecting the updated > > address. > > > > Reported-by: syzbot+015d756bbd1f8b5c8f09@syzkaller.appspotmail.com > > Fixes: d5a42de8bdbe ("net: Add a second bind table hashed by port and address") > > Signed-off-by: Joanne Koong <joannelkoong@gmail.com> > > --- > > Reviewed-by: Eric Dumazet <edumzet@google.com> > Apparently this patch (and 2/2) did not reach the ML nor patchwork (let alone my inbox ;). I've no idea on the root cause, sorry. @Joanne: could you please re-post the series? (you can retain Eric's review tag) Thanks! Paolo ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next v1 1/2] net: Update bhash2 when socket's rcv saddr changes @ 2022-06-01 9:58 ` Paolo Abeni 0 siblings, 0 replies; 6+ messages in thread From: Paolo Abeni @ 2022-06-01 9:58 UTC (permalink / raw) To: dccp Hello, On Tue, 2022-05-31 at 15:04 -0700, Eric Dumazet wrote: > On Tue, May 24, 2022 at 4:20 PM Joanne Koong <joannelkoong@gmail.com> wrote: > > > > Commit d5a42de8bdbe ("net: Add a second bind table hashed by port and > > address") added a second bind table, bhash2, that hashes by a socket's port > > and rcv address. > > > > However, there are two cases where the socket's rcv saddr can change > > after it has been binded: > > > > 1) The case where there is a bind() call on "::" (IPADDR_ANY) and then > > a connect() call. The kernel will assign the socket an address when it > > handles the connect() > > > > 2) In inet_sk_reselect_saddr(), which is called when rerouting fails > > when rebuilding the sk header (invoked by inet_sk_rebuild_header) > > > > In these two cases, we need to update the bhash2 table by removing the > > entry for the old address, and adding a new entry reflecting the updated > > address. > > > > Reported-by: syzbot+015d756bbd1f8b5c8f09@syzkaller.appspotmail.com > > Fixes: d5a42de8bdbe ("net: Add a second bind table hashed by port and address") > > Signed-off-by: Joanne Koong <joannelkoong@gmail.com> > > --- > > Reviewed-by: Eric Dumazet <edumzet@google.com> > Apparently this patch (and 2/2) did not reach the ML nor patchwork (let alone my inbox ;). I've no idea on the root cause, sorry. @Joanne: could you please re-post the series? (you can retain Eric's review tag) Thanks! Paolo ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next v1 1/2] net: Update bhash2 when socket's rcv saddr changes 2022-05-31 22:04 ` Eric Dumazet @ 2022-06-01 18:31 ` Joanne Koong -1 siblings, 0 replies; 6+ messages in thread From: Joanne Koong @ 2022-06-01 18:31 UTC (permalink / raw) To: Paolo Abeni Cc: Eric Dumazet, netdev, Martin KaFai Lau, Jakub Kicinski, David Miller, richard_siegfried, dsahern, yoshfuji, kuniyu, dccp, testing, syzbot On Wed, Jun 1, 2022 at 2:58 AM Paolo Abeni <pabeni@redhat.com> wrote: > > Hello, > > On Tue, 2022-05-31 at 15:04 -0700, Eric Dumazet wrote: > > On Tue, May 24, 2022 at 4:20 PM Joanne Koong <joannelkoong@gmail.com> wrote: > > > > > > Commit d5a42de8bdbe ("net: Add a second bind table hashed by port and > > > address") added a second bind table, bhash2, that hashes by a socket's port > > > and rcv address. > > > > > > However, there are two cases where the socket's rcv saddr can change > > > after it has been binded: > > > > > > 1) The case where there is a bind() call on "::" (IPADDR_ANY) and then > > > a connect() call. The kernel will assign the socket an address when it > > > handles the connect() > > > > > > 2) In inet_sk_reselect_saddr(), which is called when rerouting fails > > > when rebuilding the sk header (invoked by inet_sk_rebuild_header) > > > > > > In these two cases, we need to update the bhash2 table by removing the > > > entry for the old address, and adding a new entry reflecting the updated > > > address. > > > > > > Reported-by: syzbot+015d756bbd1f8b5c8f09@syzkaller.appspotmail.com > > > Fixes: d5a42de8bdbe ("net: Add a second bind table hashed by port and address") > > > Signed-off-by: Joanne Koong <joannelkoong@gmail.com> > > > --- > > > > Reviewed-by: Eric Dumazet <edumzet@google.com> > > > Apparently this patch (and 2/2) did not reach the ML nor patchwork (let > alone my inbox ;). I've no idea on the root cause, sorry. > > @Joanne: could you please re-post the series? (you can retain Eric's > review tag) > For some reason, my patches recently haven't been getting through to the netdev mailing list but they've been going through ok to the bpf one; John, Jakub, and I are looking into it and doing some investigations :) I will resend this series again. Thanks for taking a look at this patchset, Eric and Paolo. > Thanks! > > Paolo > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next v1 1/2] net: Update bhash2 when socket's rcv saddr changes @ 2022-06-01 18:31 ` Joanne Koong 0 siblings, 0 replies; 6+ messages in thread From: Joanne Koong @ 2022-06-01 18:31 UTC (permalink / raw) To: dccp On Wed, Jun 1, 2022 at 2:58 AM Paolo Abeni <pabeni@redhat.com> wrote: > > Hello, > > On Tue, 2022-05-31 at 15:04 -0700, Eric Dumazet wrote: > > On Tue, May 24, 2022 at 4:20 PM Joanne Koong <joannelkoong@gmail.com> wrote: > > > > > > Commit d5a42de8bdbe ("net: Add a second bind table hashed by port and > > > address") added a second bind table, bhash2, that hashes by a socket's port > > > and rcv address. > > > > > > However, there are two cases where the socket's rcv saddr can change > > > after it has been binded: > > > > > > 1) The case where there is a bind() call on "::" (IPADDR_ANY) and then > > > a connect() call. The kernel will assign the socket an address when it > > > handles the connect() > > > > > > 2) In inet_sk_reselect_saddr(), which is called when rerouting fails > > > when rebuilding the sk header (invoked by inet_sk_rebuild_header) > > > > > > In these two cases, we need to update the bhash2 table by removing the > > > entry for the old address, and adding a new entry reflecting the updated > > > address. > > > > > > Reported-by: syzbot+015d756bbd1f8b5c8f09@syzkaller.appspotmail.com > > > Fixes: d5a42de8bdbe ("net: Add a second bind table hashed by port and address") > > > Signed-off-by: Joanne Koong <joannelkoong@gmail.com> > > > --- > > > > Reviewed-by: Eric Dumazet <edumzet@google.com> > > > Apparently this patch (and 2/2) did not reach the ML nor patchwork (let > alone my inbox ;). I've no idea on the root cause, sorry. > > @Joanne: could you please re-post the series? (you can retain Eric's > review tag) > For some reason, my patches recently haven't been getting through to the netdev mailing list but they've been going through ok to the bpf one; John, Jakub, and I are looking into it and doing some investigations :) I will resend this series again. Thanks for taking a look at this patchset, Eric and Paolo. > Thanks! > > Paolo > ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-06-01 18:31 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <20220524230400.1509219-1-joannelkoong@gmail.com> [not found] ` <20220524230400.1509219-2-joannelkoong@gmail.com> 2022-05-31 22:04 ` [PATCH net-next v1 1/2] net: Update bhash2 when socket's rcv saddr changes Eric Dumazet 2022-05-31 22:04 ` Eric Dumazet 2022-06-01 9:58 ` Paolo Abeni 2022-06-01 9:58 ` Paolo Abeni 2022-06-01 18:31 ` Joanne Koong 2022-06-01 18:31 ` Joanne Koong
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.