net/tap: fix potential IPC buffer overrun