On 17.12.2015 19:10, Tom Herbert wrote: > On Thu, Dec 17, 2015 at 9:40 AM, Hannes Frederic Sowa > <han...@stressinduktion.org> wrote: >> On 17.12.2015 18:32, Tom Herbert wrote: >>> On Thu, Dec 17, 2015 at 12:49 AM, Hannes Frederic Sowa >>> <han...@stressinduktion.org> wrote: >>>> With user namespaces a normal user can start a new network namespace >>>> with all privileges and thus add new offloads, letting the other stack >>>> interpret this garbage. Because the user namespace can also add >>>> arbitrary ip addresses to its interface, solely matching those is not >>>> enough. >>>> >>>> Tom any further comments? >>>> >>> I still don't think this addresses the core problem. If we're just >>> worried about offloads being added in a user namespace that conflict >>> with the those in the root space, it might be just as easy to disallow >>> setting offloads except in default namespace. >> >> I am fine with that solution, too. >> >>> [...] >>> >>> To address this in the host stack the solution is pretty >>> straightforward, we need to decide that the packet is going to be >>> received before applying any offloads. Essentially we want to do an >>> early_demux _really_ early. If we demux and get UDP socket for >>> instance, then the protocol specific GRO function can be retrieved >>> from the socket. So this will work with single listener port like >>> encaps do today, and also if encapsulation is being used over a >>> connected socket. This also works if we want to support a user defined >>> GRO function like I mentioned we might want to do for QUIC etc. >> >> An approximation can be done, but I don't think it is feasible to >> implement this kind of checks across namespace borders, ip rules and >> netfilter rulesets, which could all change the outcome of the process. >> > For receive offloads we don't need to worry about checking other namespaces.
That is true. Albeit for net-branch/stable I would still suggest either this patch or restricting udp offloads just to the initial net namespace. Bye, Hannes -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html