lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 20 Feb 2007 10:47:24 -0800
From:	Max Krasnyansky <maxk@...lcomm.com>
To:	davem@...emloft.net
CC:	netdev@...r.kernel.org, allan.stephens@...driver.com,
	jon.maloy@...csson.com
Subject: Re: [TIPC] Properly mask header fields

Dave, Alan, Jon,

Max Krasnyansky wrote:
> TIPC code is a bit inconsistent in masking out upper bits of various
> message fields when packing them into the headers. For the most part
> things seem to be ok but we happened to hit a corner case in our labs
> when broadcast counter reached certain value (don't remember exact
> details) and was messing up status bits in the header. At which point
> the link was busted and required a reset to bring it back up.
> It's much safer to apply proper mask in the function that does the
> actual packing rather than doing it all over the place, and missing a
> few ;-).
> 
> Signed-off-by: Max Krasnyansky <maxk@...lcomm.com>
> ---
>  net/tipc/msg.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/net/tipc/msg.h b/net/tipc/msg.h
> index 6699aaf..4e681c8 100644
> --- a/net/tipc/msg.h
> +++ b/net/tipc/msg.h
> @@ -72,7 +72,7 @@ static inline void msg_set_bits(struct tipc_msg *m, u32 w,
>  				u32 pos, u32 mask, u32 val)
>  {
>  	u32 word = msg_word(m,w) & ~(mask << pos);
> -	msg_set_word(m, w, (word |= (val << pos)));
> +	msg_set_word(m, w, (word |= ((val & mask) << pos)));
>  }
>  
>  /* 

Just making sure that this does not get lost in the blizzard of other patches :).
Please apply.

Thanx
Max


-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists