Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3fb592b authored by Vasiliy Kulikov's avatar Vasiliy Kulikov Committed by Gustavo Padovan
Browse files

Bluetooth: l2cap: fix 1 byte infoleak to userspace



Structure l2cap_options has one padding byte between max_tx and
txwin_size fields.  This byte in "opts" is copied to userspace
uninitialized.

Signed-off-by: default avatarVasiliy Kulikov <segoon@openwall.com>
Signed-off-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
parent 6d1d4ea4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -392,6 +392,7 @@ static int l2cap_sock_getsockopt_old(struct socket *sock, int optname, char __us

	switch (optname) {
	case L2CAP_OPTIONS:
		memset(&opts, 0, sizeof(opts));
		opts.imtu     = l2cap_pi(sk)->imtu;
		opts.omtu     = l2cap_pi(sk)->omtu;
		opts.flush_to = l2cap_pi(sk)->flush_to;