All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pavel Machek" <pavel@denx.de>
To: cip-dev@lists.cip-project.org
Subject: xilinx_emaclite CVE -- was Re: [cip-dev] New CVE entries this week
Date: Thu, 12 Aug 2021 11:52:01 +0200	[thread overview]
Message-ID: <20210812095201.GA32674@duo.ucw.cz> (raw)
In-Reply-To: <CAODzB9p0uk5rg9ctkoXyD7VJVAzVQxqqdWwQmOhZYK=7UyShXw@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2073 bytes --]

Hi!

> > > * CVE detail
> > >
> > > New CVEs
> >
> > > CVE-2021-38205: net: xilinx_emaclite: Do not print real IOMEM pointer
> > >
> > > xemaclite_of_probe() in drivers/net/ethernet/xilinx/xilinx_emaclite.c
> > > leaks kernel memory layout.
> > >
> > > Fixed status
> > >
> > > mainline: [d0d62baa7f505bd4c59cd169692ff07ec49dde37]
> > > stable/5.13: [8722275b41d5127048e1422a8a1b6370b4878533]
> >
> > This affects our kernels (I looked at 5.10.57 and 4.4.277). On one
> > hand we could ask for backport, on the other... I'm not sure it is
> > serious enough to warrant any action.
> >
> 
> I think this vulnerability seems to be low priority because an
> attacker needs another vulnerability to abuse this vulnerability.
> However, it would be nice to backport the patch too.

So I tried to apply the patch to 4.4, but it rejects, because types
changed in the meantime.

In particular eccd5403814b4e762e270ef0464bb86fb217b1bf and
18af77c50fede5b3fc22aa9f0a9b255a5c5285c9 change the printk.

It seems we are actually using the driver in one of the configs:

./4.4.y-cip/arm/toshiba_zynq.sources:drivers/net/ethernet/xilinx/xilinx_emaclite.c

Patch for 4.4 should look like this:

diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index 909a008f9927..26cd42bfef0c 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -1180,9 +1180,8 @@ static int xemaclite_of_probe(struct platform_device *ofdev)
 	}
 
 	dev_info(dev,
-		 "Xilinx EmacLite at 0x%08X mapped to 0x%08X, irq=%d\n",
-		 (unsigned int __force)ndev->mem_start,
-		 (unsigned int __force)lp->base_addr, ndev->irq);
+		 "Xilinx EmacLite at 0x%08X mapped to 0x%p, irq=%d\n",
+		 (unsigned int __force)ndev->mem_start, lp->base_addr, ndev->irq);
 	return 0;
 
 error:

Best regards,
								Pavel
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 429 bytes --]


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#6676): https://lists.cip-project.org/g/cip-dev/message/6676
Mute This Topic: https://lists.cip-project.org/mt/84836349/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/10495289/4520388/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-


  reply	other threads:[~2021-08-12  9:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-12  0:33 [cip-dev] New CVE entries this week 市川正美
2021-08-12  5:43 ` Pavel Machek
2021-08-12  8:40   ` 市川正美
2021-08-12  9:52     ` Pavel Machek [this message]
2021-08-12 11:13       ` xilinx_emaclite CVE -- was " 市川正美

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=20210812095201.GA32674@duo.ucw.cz \
    --to=pavel@denx.de \
    --cc=cip-dev@lists.cip-project.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.