Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1677703
| From | Marcel Holtmann <marcel@holtmann.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] Bluetooth: Add sockaddr length checks before accessing sa_family in bind and connect handlers |
| Date | 2017-06-29 14:40 +0200 |
| Message-ID | <tXGTM-7BQ-17@gated-at.bofh.it> (permalink) |
| References | <tXGqL-7pH-47@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Mateusz, > Verify that the caller-provided sockaddr structure is large enough to > contain the sa_family field, before accessing it in bind() and connect() > handlers of the Bluetooth sockets. Since neither syscall enforces a minimum > size of the corresponding memory region, very short sockaddrs (zero or one > byte long) result in operating on uninitialized memory while referencing > sa_family. > > Signed-off-by: Mateusz Jurczyk <mjurczyk@google.com> > --- > net/bluetooth/l2cap_sock.c | 5 +++-- > net/bluetooth/rfcomm/sock.c | 3 ++- > net/bluetooth/sco.c | 6 ++---- > 3 files changed, 7 insertions(+), 7 deletions(-) patch has been applied to bluetooth-next tree. Regards Marcel
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] Bluetooth: Add sockaddr length checks before accessing sa_family in bind and connect handlers Mateusz Jurczyk <mjurczyk@google.com> - 2017-06-29 14:10 +0200 Re: [PATCH] Bluetooth: Add sockaddr length checks before accessing sa_family in bind and connect handlers Marcel Holtmann <marcel@holtmann.org> - 2017-06-29 14:40 +0200
csiph-web