From: Ganapathi Bhat <gbhat@marvell.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
qize wang <wangqize888888888@gmail.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
amitkarwar <amitkarwar@gmail.com>,
nishants <nishants@marvell.com>,
huxinming820 <huxinming820@gmail.com>,
kvalo <kvalo@codeaurora.org>, Greg KH <greg@kroah.com>,
security <security@kernel.org>,
linux-distros <linux-distros@vs.openwall.org>,
Solar Designer <solar@openwall.com>
Subject: RE: [EXT] Re: [PATCH] mwifiex: Fix heap overflow in mmwifiex_process_tdls_action_frame()
Date: Fri, 22 Nov 2019 11:40:40 +0000 [thread overview]
Message-ID: <MN2PR18MB26373BC0C0D63A7C3CE09FC4A0490@MN2PR18MB2637.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20191122111339.GH617@kadam>
Hi Dan,
> > + /* copy the ie's value into ht_capb*/
> > + memcpy((u8 *)&sta_ptr->tdls_cap.ht_capb, pos + 2,
> ^^^^^^^
>
> I don't understand why we changed "pos" to "pos + 2". Presumably there is
> a reason, but it needs to explained in the commit message.
I think, we were doing wrong in the original code. We are supposed to use 'pos + 2' itself, instead of just 'pos'. This is because, 'pos' is pointing to 'ieee_types_header', followed by the actual data and the destination do not start with (i.e. it do not contain) 'ieee_types_header'(ex: 'sta_ptr->tdls_cap.ht_oper').
Also, there are few places were the destination starts with 'ieee_types_header'(ex: 'sta_ptr->tdls_cap.extcap'), which need just 'pos'.
Regards,
Ganapathi
next prev parent reply other threads:[~2019-11-22 11:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-22 9:43 [PATCH] mwifiex: Fix heap overflow in mmwifiex_process_tdls_action_frame() qize wang
2019-11-22 11:13 ` Dan Carpenter
2019-11-22 11:40 ` Ganapathi Bhat [this message]
2019-11-22 12:37 ` [EXT] " Dan Carpenter
2019-11-22 14:27 ` qize wang
2019-11-25 16:04 ` [EXT] " qize wang
2019-11-28 8:05 ` Kalle Valo
[not found] ` <CAGftXBH+s3HaWzoX8hsBdukv0NJsXZc7XZCT=mH5ejeiV9gFrQ@mail.gmail.com>
2019-11-29 5:21 ` Kalle Valo
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=MN2PR18MB26373BC0C0D63A7C3CE09FC4A0490@MN2PR18MB2637.namprd18.prod.outlook.com \
--to=gbhat@marvell.com \
--cc=amitkarwar@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=greg@kroah.com \
--cc=huxinming820@gmail.com \
--cc=kvalo@codeaurora.org \
--cc=linux-distros@vs.openwall.org \
--cc=linux-wireless@vger.kernel.org \
--cc=nishants@marvell.com \
--cc=security@kernel.org \
--cc=solar@openwall.com \
--cc=wangqize888888888@gmail.com \
/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).