From: Leon Romanovsky <leon@kernel.org>
To: bugzilla-daemon@bugzilla.kernel.org
Cc: linux-rdma@vger.kernel.org
Subject: Re: [Bug 210973] New: info leaks in all kernel versions including android
Date: Thu, 31 Dec 2020 08:57:48 +0200 [thread overview]
Message-ID: <20201231065748.GC6438@unreal> (raw)
In-Reply-To: <bug-210973-11804@https.bugzilla.kernel.org/>
On Wed, Dec 30, 2020 at 10:50:43PM +0000, bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=210973
>
> Bug ID: 210973
> Summary: info leaks in all kernel versions including android
> Product: Drivers
> Version: 2.5
> Kernel Version: latest
> Hardware: All
> OS: Linux
> Tree: Mainline
> Status: NEW
> Severity: high
> Priority: P1
> Component: Infiniband/RDMA
> Assignee: drivers_infiniband-rdma@kernel-bugs.osdl.org
> Reporter: fxast243@gmail.com
> Regression: No
>
> While I audit android kernel source code , I noticed that there is an
> Uninitialized data which could lead to info leak in ib_uverbs_create_ah
> function. I download the source code from here
> https://android.googlesource.com/kernel/common. Also it exists in the
> linux-masters
>
> https://github.com/torvalds/linux/blob/master/drivers/infiniband/core/uverbs_cmd.c#L2408
>
>
> # BUG
> resp.ah_handle = uobj->id;
> return uverbs_response(attrs, &resp, sizeof(resp));
Thanks for the report.
There is no info leak here because according to the C99 standard if flexible
array doesn't have members, it will be treated as non-existent for the struct
size calculations.
In our case sizeof(u32) == sizeof(struct ib_uverbs_create_ah_resp) and
not sizeof(u32) + sizeof(u32) as you wrote.
See 6.7.2.1 Structureand union specifiers, item 16 for more info.
Thanks
prev parent reply other threads:[~2020-12-31 6:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-30 22:50 [Bug 210973] New: info leaks in all kernel versions including android bugzilla-daemon
2020-12-31 6:57 ` Leon Romanovsky [this message]
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=20201231065748.GC6438@unreal \
--to=leon@kernel.org \
--cc=bugzilla-daemon@bugzilla.kernel.org \
--cc=linux-rdma@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.