On 23/06/20(Tue) 16:21, Martin Pieuchot wrote: > On 23/06/20(Tue) 04:53, Jason A. Donenfeld wrote: > > On 6/23/20, Martin Pieuchot <m...@openbsd.org> wrote: > > > On 23/06/20(Tue) 01:00, Jason A. Donenfeld wrote: > > >> You can crash a system by running something like: > > >> > > >> for i in 1 2 3; do while true; do ifconfig bridge0 create& ifconfig > > >> bridge0 destroy& done& done
As mentioned already the proposed diff doesn't protect creation of cloning devices via open(2). The above test could be replaced by: for i in 1 2 3; do while true; \ do cat /dev/tun0& ifconfig tun0 destroy& done& done The same could be applied to switch(4) or by replacing the cat(1) magic with 'ifconfig bridge0 add vether0.