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



Hi,

On Tue, May 28, 2019 at 05:31:54AM -0000, Michael van Elst wrote:
> Why would the first be obvious? The TCP header is already aligned
> and so is the first option value. I am pretty sure that worse things
> will happen if that assumption were broken.

Without actually looking at the code - the *first* TCP option is aligned,
but we've seen (due to unaligned 16 bit loads...) in OpenVPN that you
could encounter TCP packets that have a single-byte NOP option and then 
TCP MSS...  which led to spurious SIGBUS on Linux/SPARC64.

So if this is for accessing *any* TCP option (not just the first), you 
can not assume alignment.

gert
-- 
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             gert%greenie.muc.de@localhost


Home | Main Index | Thread Index | Old Index