Page MenuHomeFreeBSD

Fix netdump buffering.
ClosedPublic

Authored by markj on Aug 16 2019, 7:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Sep 27, 5:36 PM
Unknown Object (File)
Fri, Sep 26, 1:28 AM
Unknown Object (File)
Thu, Sep 25, 12:09 PM
Unknown Object (File)
Thu, Sep 25, 6:41 AM
Unknown Object (File)
Aug 11 2025, 3:36 PM
Unknown Object (File)
Aug 10 2025, 10:37 AM
Unknown Object (File)
Jul 22 2025, 10:04 AM
Unknown Object (File)
Jul 15 2025, 2:11 PM
Subscribers

Details

Summary

r348473 didn't take into account the fact that we use nd_buf for
buffering kernel dump and EKCD headers. This is done before the final
call to netdump_dumper(), which flushes residual data, so we were
clobbering that data. Add a netdump_flush_buf() function to flush
residual data and use it before copying headers into the buffer.

Test Plan

I never noticed this when debugging dumps from a netdump-enabled
syzkaller setup, but it manifested when I enabled zstd compression:
the decompressor would report corruption.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable