tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Patches fixing unaligned access in the networking code



On 28.05.2019 13:28, Robert Elz wrote:
> This code is in the network packet processing fast path - it only exists
> at all as an optimisation to make things run faster, since it happens so
> much - slowing it down is unacceptable when the reason is nothing more
> that satisfying some misapplied technical quibble.
> 
> kre
> 

This is the last UBSan issue detected by kUBSan on boot & ATF execution
of tests on few tested setups and we plan to enable it soon in syzkaller
to catch significantly more interesting flaws (integer and pointer
overflows, invalid shifts, out of bounds access, etc).

http://netbsd.org/~kamil/patch-00115-tcp_input.3.txt

This disabled the reports for me locally.

Izumi proposed be32enc(9). This looks much cleaner. Internally it uses
the proposed byte concatenation, but the data here won't change in the
middle of operation so should be fine.

http://netbsd.org/~kamil/patch-00115-tcp_input.4.txt

We basically replace ntohl(9) calls with be32dec(9).

This makes the reports to disappear for me. Is it fine to merge this
version?

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index