[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190726114416.GS9224@smile.fi.intel.com>
Date: Fri, 26 Jul 2019 14:44:16 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Sedat Dilek <sedat.dilek@...dativ.de>
Cc: Clément Perrochaud
<clement.perrochaud@...innov.com>,
Charles Gorand <charles.gorand@...innov.com>,
netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
Andrey Konovalov <andreyknvl@...gle.com>
Subject: Re: [PATCH v3 01/14] NFC: fix attrs checks in netlink interface
On Fri, Jul 26, 2019 at 10:54:22AM +0200, Sedat Dilek wrote:
> [ Please CC me I am not subscribed to this ML ]
>
> Hi Andy,
>
> unfortunately, I did not found a cover-letter on netdev mailing-list.
> So, I am answering here.
>
> What are the changes v2->v3?
I combined my 11 patches with 1 from syzkaller team and 2 from you.
That's only the change for the series.
Administratively I resent it to have updated Cc list.
> Again, unfortunately I throw away all v2 out of my local linux Git repository.
> So, I could have looked at the diff myself.
It should be no changes in the code.
>
> Thanks for v3 upgrade!
>
> Regards,
> - Sedat -
>
> [1] https://marc.info/?a=131071969100005&r=1&w=2
>
> > Andy Shevchenko <andriy.shevchenko@...ux.intel.com> hat am 25. Juli 2019 21:34 geschrieben:
> >
> >
> > From: Andrey Konovalov <andreyknvl@...gle.com>
> >
> > nfc_genl_deactivate_target() relies on the NFC_ATTR_TARGET_INDEX
> > attribute being present, but doesn't check whether it is actually
> > provided by the user. Same goes for nfc_genl_fw_download() and
> > NFC_ATTR_FIRMWARE_NAME.
> >
> > This patch adds appropriate checks.
> >
> > Found with syzkaller.
> >
> > Signed-off-by: Andrey Konovalov <andreyknvl@...gle.com>
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> > ---
> > net/nfc/netlink.c | 6 ++++--
> > 1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c
> > index 4a30309bb67f..60fd2748d0ea 100644
> > --- a/net/nfc/netlink.c
> > +++ b/net/nfc/netlink.c
> > @@ -970,7 +970,8 @@ static int nfc_genl_dep_link_down(struct sk_buff *skb, struct genl_info *info)
> > int rc;
> > u32 idx;
> >
> > - if (!info->attrs[NFC_ATTR_DEVICE_INDEX])
> > + if (!info->attrs[NFC_ATTR_DEVICE_INDEX] ||
> > + !info->attrs[NFC_ATTR_TARGET_INDEX])
> > return -EINVAL;
> >
> > idx = nla_get_u32(info->attrs[NFC_ATTR_DEVICE_INDEX]);
> > @@ -1018,7 +1019,8 @@ static int nfc_genl_llc_get_params(struct sk_buff *skb, struct genl_info *info)
> > struct sk_buff *msg = NULL;
> > u32 idx;
> >
> > - if (!info->attrs[NFC_ATTR_DEVICE_INDEX])
> > + if (!info->attrs[NFC_ATTR_DEVICE_INDEX] ||
> > + !info->attrs[NFC_ATTR_FIRMWARE_NAME])
> > return -EINVAL;
> >
> > idx = nla_get_u32(info->attrs[NFC_ATTR_DEVICE_INDEX]);
> > --
> > 2.20.1
>
>
> --
> Mit freundlichen Grüssen
> Sedat Dilek
> Telefon: +49 2166 9901-153
> E-Mail: sedat.dilek@...dativ.de
> Internet: https://www.credativ.de/
>
> GPG-Fingerprint: EA6D E17D D269 AC7E 101D C910 476F 2B3B 0AF7 F86B
>
> credativ GmbH, Trompeterallee 108, 41189 Mönchengladbach
> Handelsregister: Amtsgericht Mönchengladbach HRB 12080 USt-ID-Nummer DE204566209
> Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer
>
> Unser Umgang mit personenbezogenen Daten unterliegt folgenden Bestimmungen:
> https://www.credativ.de/datenschutz/
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists