Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1462103
| Path | csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Ben Hutchings <ben@decadent.org.uk> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 3.16 280/305] tipc: fix an infoleak in tipc_nl_compat_link_dump |
| Date | Sun, 14 Aug 2016 14:10:04 +0200 |
| Message-ID | <s62oQ-7TC-87@gated-at.bofh.it> (permalink) |
| References | <s5LnX-4sk-3@gated-at.bofh.it> |
| X-Original-To | linux-kernel@vger.kernel.org, stable@vger.kernel.org |
| Content-Type | text/plain; charset="UTF-8" |
| Content-Disposition | inline |
| Content-Transfer-Encoding | 8bit |
| MIME-Version | 1.0 |
| X-Mailer | LinuxStableQueue (scripts by bwh) |
| X-Sa-Exim-Connect-IP | 92.40.249.202 |
| X-Sa-Exim-Mail-From | ben@decadent.org.uk |
| X-Sa-Exim-Scanned | No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 30 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | akpm@linux-foundation.org, "Kangjie Lu" <kjlu@gatech.edu>, "David S. Miller" <davem@davemloft.net>, "Kangjie Lu" <kangjielu@gmail.com> |
| X-Original-Date | Sat, 13 Aug 2016 18:42:51 +0100 |
| X-Original-Message-ID | <lsq.1471110171.650993865@decadent.org.uk> |
| X-Original-References | <lsq.1471110169.907390585@decadent.org.uk> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1462103 |
Show key headers only | View raw
3.16.37-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Kangjie Lu <kangjielu@gmail.com> commit 5d2be1422e02ccd697ccfcd45c85b4a26e6178e2 upstream. link_info.str is a char array of size 60. Memory after the NULL byte is not initialized. Sending the whole object out can cause a leak. Signed-off-by: Kangjie Lu <kjlu@gatech.edu> Signed-off-by: David S. Miller <davem@davemloft.net> [carnil: Backported to 3.16 (same as bwh did for 3.2): the unpadded strcpy() is in tipc_node_get_links() and no nlattr is involved, so use strncpy()] Signed-off-by: Ben Hutchings <ben@decadent.org.uk> --- --- a/net/tipc/node.c +++ b/net/tipc/node.c @@ -417,7 +417,8 @@ struct sk_buff *tipc_node_get_links(cons continue; link_info.dest = htonl(n_ptr->addr); link_info.up = htonl(tipc_link_is_up(n_ptr->links[i])); - strcpy(link_info.str, n_ptr->links[i]->name); + strncpy(link_info.str, n_ptr->links[i]->name, + sizeof(link_info.str)); tipc_cfg_append_tlv(buf, TIPC_TLV_LINK_INFO, &link_info, sizeof(link_info)); }
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 3.16 280/305] tipc: fix an infoleak in tipc_nl_compat_link_dump Ben Hutchings <ben@decadent.org.uk> - 2016-08-14 14:10 +0200
csiph-web