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  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20150729.170731.1725393558438186362.davem@davemloft.net>
Date:	Wed, 29 Jul 2015 17:07:31 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	marcelo.leitner@...il.com
Cc:	netdev@...r.kernel.org, vyasevich@...il.com
Subject: Re: [PATCH net] sctp: fix sockopt size check

From: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
Date: Tue, 28 Jul 2015 11:16:23 -0300

> The problem is not on being bigger than what we want, but on being
> smaller, as it causes read of invalid memory.
> 
> Note that the struct changes on commit 7e8616d8e773 didn't affect
> sctp_setsockopt_events one but that's where this check was flipped.
> 
> Fixes: 7e8616d8e773 ("[SCTP]: Update AUTH structures to match
> declarations in draft-16.")
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>

This makes things worse.

The copy_from_user() call is bounded by optlen, so if you allow it to
be any arbitrary large value the user can write past the end of the
structure, corrupting kernel memory.

No, the test is correct, or at least necessary, as-is.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ