sandbox: prevent segfault in tap_alloc()
Tap network interface initialization in sandbox
barebox leads to segfault under Debian Buster/Sid.

The problem is that strcpy(dev, ifr.ifr_name) inside
tap_alloc() tries to alter read-only data passed
by tap_probe() and barebox receives SIGSEGV.

Nobody uses network interface name returned
by tap_alloc() so we can drop this strcpy().

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 3f44fcb commit b6eab2a491184dcf6361baeca709c3d781a165bb
@Antony Pavlov Antony Pavlov authored on 2 Jul 2019
Sascha Hauer committed on 11 Jul 2019
Showing 2 changed files
View
arch/sandbox/mach-sandbox/include/mach/linux.h
View
arch/sandbox/os/tap.c