Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1353373
| From | David Miller <davem@davemloft.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH net v2] sctp: fix copying more bytes than expected in sctp_add_bind_addr |
| Date | 2016-03-08 21:10 +0100 |
| Message-ID | <raw78-5OE-19@gated-at.bofh.it> (permalink) |
| References | <raq1J-1uo-37@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Date: Tue, 8 Mar 2016 10:34:28 -0300 > Dmitry reported that sctp_add_bind_addr may read more bytes than > expected in case the parameter is a IPv4 addr supplied by the user > through calls such as sctp_bindx_add(), because it always copies > sizeof(union sctp_addr) while the buffer may be just a struct > sockaddr_in, which is smaller. > > This patch then fixes it by limiting the memcpy to the min between the > union size and a (new parameter) provided addr size. Where possible this > parameter still is the size of that union, except for reading from > user-provided buffers, which then it accounts for protocol type. > > Reported-by: Dmitry Vyukov <dvyukov@google.com> > Tested-by: Dmitry Vyukov <dvyukov@google.com> > Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Applied, thanks.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH net v2] sctp: fix copying more bytes than expected in sctp_add_bind_addr Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> - 2016-03-08 14:40 +0100 Re: [PATCH net v2] sctp: fix copying more bytes than expected in sctp_add_bind_addr David Miller <davem@davemloft.net> - 2016-03-08 21:10 +0100
csiph-web