Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1590847
| From | Cong Wang <xiyou.wangcong@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4] net: don't call strlen() on the user buffer in packet_bind_spkt() |
| Date | 2017-03-02 06:30 +0100 |
| Message-ID | <tgrto-612-7@gated-at.bofh.it> (permalink) |
| References | <tgcb1-3ud-61@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Mar 1, 2017 at 3:57 AM, Alexander Potapenko <glider@google.com> wrote:
> This happens because addr.sa_data copied from the userspace is not
> zero-terminated, and copying it with strlcpy() in packet_bind_spkt()
> results in calling strlen() on the kernel copy of that non-terminated
> buffer.
Very similar to
commit b301f2538759933cf9ff1f7c4f968da72e3f0757
Author: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Thu Mar 24 21:29:53 2016 +0100
netfilter: x_tables: enforce nul-terminated table name from
getsockopt GET_ENTRIES
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v4] net: don't call strlen() on the user buffer in packet_bind_spkt() Alexander Potapenko <glider@google.com> - 2017-03-01 14:10 +0100 Re: [PATCH v4] net: don't call strlen() on the user buffer in packet_bind_spkt() Eric Dumazet <eric.dumazet@gmail.com> - 2017-03-01 17:00 +0100 Re: [PATCH v4] net: don't call strlen() on the user buffer in packet_bind_spkt() Cong Wang <xiyou.wangcong@gmail.com> - 2017-03-02 06:30 +0100 Re: [PATCH v4] net: don't call strlen() on the user buffer in packet_bind_spkt() David Miller <davem@davemloft.net> - 2017-03-02 07:20 +0100
csiph-web