Vladimir Oltean
2022-Jul-21 11:45 UTC
[Bridge] [PATCH net-next v1 1/1] net: bridge: ensure that link-local traffic cannot unlock a locked port
On Sun, Jul 17, 2022 at 09:20:57PM +0200, Hans S wrote:> On Sun, Jul 17, 2022 at 8:38 PM Vladimir Oltean <olteanv at gmail.com> wrote: > > > > On Sun, Jul 17, 2022 at 06:22:57PM +0200, Hans S wrote: > > > On Sun, Jul 17, 2022 at 4:03 PM Vladimir Oltean <olteanv at gmail.com> wrote: > > > > > > Yes, it creates an FDB entry in the bridge without the locked flag > > > set, and sends an ADD_TO_DEVICE notice with it. > > > And furthermore link-local packets include of course EAPOL packets, so > > > that's why +learning is a problem. > > > > So if we fix that, and make the dynamically learned FDB entry be locked > > because the port is locked (and offload them correctly in mv88e6xxx), > > what would be the problem, exactly? The +learning is what would allow > > these locked FDB entries to be created, and would allow the MAB to work. > > User space may still decide to not authorize this address, and it will > > remain locked. > > The alternative is to have -learning and let the driver only enable > the PAV to admit the interrupts, which is what this implementation > does. > The plus side of this is that having EAPOL packets triggering locked > entries from the bridge side is not really so nice IMHO. In a > situation with 802.1X and MAB on the same port, there will then not be > any triggering of MAB when initiating the 802.1X session, which I > think is the best option. It then also lessens the confusion between > hostapd and the daemon that handles MAB sessions.Why is it "not really so nice" to "trigger MAB" (in fact only to learn a locked entry on a locked port) when initiating the 802.1X session? You can disable link-local learning via the bridge option if you're really bothered by that. When you have MAB enabled on an 802.1X port, I think it's reasonable to expect that there will be some locked entries which user space won't ever unlock via MAB. If those entries happen to be created as a side effect of the normal EAPOL authentication process, I don't exactly see where is the functional problem. This shouldn't block EAPOL from proceeding any further, because this protocol uses link-local packets which are classified as control traffic, and that isn't subject to FDB lookups but rather always trapped to CPU, so locked or not, it should still be received. I'm only pointing out the obvious here, we need an opt in for MAB, and the implemented behavior I've seen here kind of points to mapping this to "+learning +locked", where the learning process creates locked FDB entries.
Hans S
2022-Jul-21 14:06 UTC
[Bridge] [PATCH net-next v1 1/1] net: bridge: ensure that link-local traffic cannot unlock a locked port
On Thu, Jul 21, 2022 at 1:45 PM Vladimir Oltean <olteanv at gmail.com> wrote:> > Why is it "not really so nice" to "trigger MAB" (in fact only to learn a > locked entry on a locked port) when initiating the 802.1X session?The consideration is mostly to limit (not eliminate) double actrivation, e.g. activation of 802.1X and MAB at roughly the same time, so that the daemons will have more to do coordinating which has the session.> You can disable link-local learning via the bridge option if you'reThe issue here is that you can only disable it bridge wide and not per port.> really bothered by that. When you have MAB enabled on an 802.1X port, > I think it's reasonable to expect that there will be some locked entries > which user space won't ever unlock via MAB. If those entries happen to > be created as a side effect of the normal EAPOL authentication process, > I don't exactly see where is the functional problem. This shouldn't > block EAPOL from proceeding any further, because this protocol uses > link-local packets which are classified as control traffic, and that > isn't subject to FDB lookups but rather always trapped to CPU, so locked > or not, it should still be received. > > I'm only pointing out the obvious here, we need an opt in for MAB, and > the implemented behavior I've seen here kind of points to mapping this > to "+learning +locked", where the learning process creates locked FDB entries.If we need an opt in for MAB, you are right. Only then I think that we need to solve the link-local learning issue so that it is disabled per port?
Hans S
2022-Jul-24 08:09 UTC
[Bridge] [PATCH net-next v1 1/1] net: bridge: ensure that link-local traffic cannot unlock a locked port
On Thu, Jul 21, 2022 at 1:45 PM Vladimir Oltean <olteanv at gmail.com> wrote:> > On Sun, Jul 17, 2022 at 09:20:57PM +0200, Hans S wrote: > > I'm only pointing out the obvious here, we need an opt in for MAB, and > the implemented behavior I've seen here kind of points to mapping this > to "+learning +locked", where the learning process creates locked FDB entries.I can go with the reasoning for the opt in for MAB, but disabling link local learning system wide I don't think is a good idea, unless someone can ensure me that it does not impact something else. In general locked ports should never learn from link local, which is a problem if they do, which suggests to me that this patch should eventually be accepted as the best solution.