--- - branch: netbsd-8 date: Thu Jul 12 15:11:56 UTC 2018 files: - new: 1.125.6.9 old: 1.125.6.8 path: src/sys/net/if_pppoe.c pathrev: src/sys/net/if_pppoe.c@1.125.6.9 type: modified id: 20180712T151156Z.9dc5d285b6a94577fb3afb659e9f7211acf1c19a log: "Pull up following revision(s) (requested by yamaguchi in ticket #890):\n\tsys/net/if_pppoe.c: revision 1.137\n\tsys/net/if_pppoe.c: revision 1.139\n\tsys/net/if_pppoe.c: revision 1.140\nDrop early if there's no PPPoE interface. Otherwise it is easy for someone\nto flood dmesg over the local subnet.\nFix not to use PPPOE_UNLOCK before acccess to pppoe_softc\nto avoid a race condition\nAccording to the locking order of pppoe(4), the access to\npppoe_softc has to follow 5 steps as below.\n1. aquire pppoe_softc_list_lock\n2. aquire pppoe_softc lock\n3. release pppoe_softc_list_lock\n4. access to pppoe_softc\n5. release pppoe_softc lock\nHowever, pppoe_dispatch_disc_pkt() releases the lock of pppoe_softc\ntemporarily, and then re-aquires it before step 4 of the adove. So,\nit is possible for other contexts to destroy a pppoe_softc in the\ninterim.\nTo fix this condition, avoid PPPOE_UNLOCK with the problem.\nok by knakahara@n.o\nFix to aquire pppoe_softc_list_lock before read and write the list\nok by knakahara@n.o\n" module: src subject: 'CVS commit: [netbsd-8] src/sys/net' unixtime: '1531408316' user: martin