From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [PATCH v4 2/4] batman-adv: Store and transmit own neighborhood hash
Date: Tue, 21 Feb 2017 11:33:31 +0100 [thread overview]
Message-ID: <3917105.FHGCDfL2DZ@bentobox> (raw)
In-Reply-To: <20170205064550.30262-3-linus.luessing@c0d3.blue>
[-- Attachment #1: Type: text/plain, Size: 561 bytes --]
On Sonntag, 5. Februar 2017 07:45:48 CET Linus Lüssing wrote:
[...]
> + size = sizeof(*nhh_data);
> + elp_buff = skb_put(hard_iface->bat_v.elp_skb, size);
> + nhh_data = (struct batadv_tvlv_nhh_data *)elp_buff;
> + nhh_data->min_throughput = htonl(0);
> + nhh_data->max_throughput = htonl(U32_MAX);
> + memset(nhh_data->neigh_hash, 0, size);
This looks to me like a buffer overflow by memset. Maybe you want to use the
size of nhh_data->neigh_hash in this memset and not sizeof(*nhh_data).
Kind regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-02-21 10:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-05 6:45 [B.A.T.M.A.N.] [PATCH v4 0/4] Broadcast Avoidances, Neighborhood Hash Linus Lüssing
2017-02-05 6:45 ` [B.A.T.M.A.N.] [PATCH v4 1/4] batman-adv: Keep hard interface neighbor list sorted Linus Lüssing
2017-02-05 6:45 ` [B.A.T.M.A.N.] [PATCH v4 2/4] batman-adv: Store and transmit own neighborhood hash Linus Lüssing
2017-02-21 10:33 ` Sven Eckelmann [this message]
2017-02-05 6:45 ` [B.A.T.M.A.N.] [PATCH v4 3/4] batman-adv: Introduce packet type independent TVLV handler API Linus Lüssing
2017-02-05 9:53 ` Linus Lüssing
2017-02-05 6:45 ` [B.A.T.M.A.N.] [PATCH v4 4/4] batman-adv: Evaluate and use neighborhood hash TVLV Linus Lüssing
2017-04-25 0:53 ` [B.A.T.M.A.N.] [PATCH v4 0/4] Broadcast Avoidances, Neighborhood Hash Linus Lüssing
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3917105.FHGCDfL2DZ@bentobox \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).