Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.bugs.dist > #1069417
| Path | csiph.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!bofh.it!news.nic.it!robomod |
|---|---|
| From | Luca Boccassi <bluca@debian.org> |
| Newsgroups | linux.debian.bugs.dist |
| Subject | Bug#983591: iproute2: running 'ip -6 -r route' results in printing an unitialized buffer for the hostname on 'dev' routes |
| Date | Thu, 02 Sep 2021 12:50:02 +0200 |
| Message-ID | <CSSsa-6bm-21@gated-at.bofh.it> (permalink) |
| References | <BMSdI-4s9-13@gated-at.bofh.it> <BMSdI-4s9-13@gated-at.bofh.it> |
| X-Original-To | 983591@bugs.debian.org, axel.scheepers76@gmail.com |
| X-Mailbox-Line | From debian-bugs-dist-request@lists.debian.org Thu Sep 2 10:45:12 2021 |
| Old-Return-Path | <debbugs@buxtehude.debian.org> |
| X-Spam-Flag | NO |
| X-Spam-Score | -4.2 |
| Reply-To | Luca Boccassi <bluca@debian.org>, 983591@bugs.debian.org |
| Resent-To | debian-bugs-dist@lists.debian.org |
| Resent-Cc | Alexander Wirt <formorer@debian.org> |
| X-Debian-Pr-Message | followup 983591 |
| X-Debian-Pr-Package | iproute2 |
| X-Debian-Pr-Keywords | ipv6 |
| X-Debian-Pr-Source | iproute2 |
| X-Gm-Message-State | AOAM532SHTrjsKYnUNzQZKNLPdaKrroJy8mabp2oymejJQR4FvnwMNQK +gWSpUQF8nLb+0iwV256fggrK0Yqb8BE7A== |
| X-Google-SMTP-Source | ABdhPJx+QEZFLnhnbKw4zmZw6s9eByfdpYmR0+yG0qvjj2yMgSSh6Cj3WjfRTIfz71qwNFMw1uCVdw== |
| X-Received | by 2002:a05:600c:a49:: with SMTP id c9mr2406674wmq.159.1630579452026; Thu, 02 Sep 2021 03:44:12 -0700 (PDT) |
| Content-Type | multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-xhLR+j9sPiLwk5ycZjJb" |
| User-Agent | Evolution 3.38.3-1 |
| MIME-Version | 1.0 |
| X-Debian-Message | from BTS |
| X-Mailing-List | <debian-bugs-dist@lists.debian.org> archive/latest/1676374 |
| List-ID | <debian-bugs-dist.lists.debian.org> |
| List-URL | <https://lists.debian.org/debian-bugs-dist/> |
| Approved | robomod@news.nic.it |
| Lines | 64 |
| Organization | linux.* mail to news gateway |
| Sender | robomod@news.nic.it |
| X-Original-Date | Thu, 02 Sep 2021 11:44:09 +0100 |
| X-Original-Message-ID | <8d069f4f33c828517a3e283f8fa893b14ba7d4af.camel@debian.org> |
| X-Original-References | <161437207732.184720.7610347549410078500.reportbug@teal> <161437207732.184720.7610347549410078500.reportbug@teal> |
| Xref | csiph.com linux.debian.bugs.dist:1069417 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
Control: tags -1 moreinfo
On Fri, 26 Feb 2021 21:41:17 +0100 Axel Scheepers
<axel.scheepers76@gmail.com> wrote:
> Package: iproute2
> Version: 5.10.0-4
> Severity: normal
> Tags: ipv6
>
> Dear Maintainer,
>
> * What led up to the situation?
>
> Using ip -6 -r route shows (on 10.8) either an information leak:
> $ ip -6 -r r
> +U dev lo proto kernel metric 256 pref medium
>
> or (on testing) empty output:
>
> $ ip -6 -r r
> dev lo proto kernel metric 256 pref medium
>
> for the resolved hostname.
>
> * What outcome did you expect instead?
>
> Printing of the resolved name, e.g. 'localhost' for dev lo.
>
> Reading the source and a bit of printf debugging i can see it's
> in lib/utils.c, format_host_r:
>
> 1113z20n
> 1113 const char *format_host_r(int af, int len, const void *addr,
> 1114 char *buf, int buflen)
> 1115 {
> 1116 #ifdef RESOLVE_HOSTNAMES
> 1117 if (resolve_hosts) {
> 1118 const char *n;
> 1119
> 1120 puts("XXX: here");
> 1121 len = len <= 0 ? af_byte_len(af) : len;
> 1122
> 1123 if (len > 0 &&
> 1124 (n = resolve_address(addr, len, af)) !=
> NULL)
> 1125 {
> 1126 printf("n is '%s'\n", n);
> 1127 strncpy(buf, n, buflen);
> 1128 return n;
> 1129 }
> 1130 }
> 1131 #endif
>
>
> results in:
> ./ip/ip -6 -r r
> XXX: here
> n is 'localhost'
> localhost dev lo proto kernel metric 256 pref medium
>
>
> Something better then this awful hack should be implemented i guess.
>
> Kind regards,
This is fixed for me with 5.13, which is now in testing - can you
confirm?
$ ip -6 -r r
localhost dev lo proto kernel metric 256 pref medium
$ ip -V
ip utility, iproute2-5.13.0, libbpf 0.4.0
--
Kind regards,
Luca Boccassi
Back to linux.debian.bugs.dist | Previous | Next — Next in thread | Find similar | Unroll thread
Bug#983591: iproute2: running 'ip -6 -r route' results in printing an unitialized buffer for the hostname on 'dev' routes Luca Boccassi <bluca@debian.org> - 2021-09-02 12:50 +0200 Bug#983591: iproute2: running 'ip -6 -r route' results in printing an unitialized buffer for the hostname on 'dev' routes Axel Scheepers <axel.scheepers76@gmail.com> - 2021-09-02 19:00 +0200
csiph-web