DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, david.marchand@redhat.com
Subject: Re: [dpdk-dev] [PATCH v2 0/4] improve runtime loading of shared drivers
Date: Fri, 3 Jul 2020 11:25:27 +0100	[thread overview]
Message-ID: <20200703102527.GB620@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <3999296.XklStIvXRF@thomas>

On Thu, Jul 02, 2020 at 11:13:02PM +0200, Thomas Monjalon wrote:
> 22/06/2020 16:33, Bruce Richardson:
> > This set includes a number of small improvements for handling the loading
> > of drivers at runtime using the EAL -d flag.
> > 
> > It limits the loading of files to only those files which end in .so, which
> > means that one can pass in the whole "drivers/" subfolder from a meson
> > build and not get an error when DPDK trys to load a .a file.
> > 
> > It also puts in some basic permission checking to ensure that no drivers
> > are loaded from a world-writable location on the filesystem, which would be
> > a potential security hole on a mis-configured system.
> > 
> > v2: rebased to fix errors on apply
> >     fixed one checkpatch issue.
> > 
> > Bruce Richardson (4):
> >   eal: remove unnecessary null-termination
> >   eal: only load shared libs from driver plugin directory
> >   eal: don't load drivers from insecure paths
> >   eal: cache last directory permissions checked
> 
> There is an error when running devtools/test-null.sh:
> 
> EAL: Error with realpath, No such file or directory
> EAL: FATAL: Cannot init plugins
> 
Yes, I missed the fact that we can load drivers without paths letting
dlopen search system directories. I think we can assume system dirs are
secure, and so can just skip any permission checks in case where we can't
get the realpath of the filename passed in.

Fixed in v3.

  reply	other threads:[~2020-07-03 10:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-18 13:50 [dpdk-dev] [PATCH " Bruce Richardson
2020-06-18 13:50 ` [dpdk-dev] [PATCH 1/4] eal: remove unnecessary null-termination Bruce Richardson
2020-06-18 13:50 ` [dpdk-dev] [PATCH 2/4] eal: only load shared libs from driver plugin directory Bruce Richardson
2020-06-18 13:50 ` [dpdk-dev] [PATCH 3/4] eal: don't load drivers from insecure paths Bruce Richardson
2020-06-18 13:50 ` [dpdk-dev] [PATCH 4/4] eal: cache last directory permissions checked Bruce Richardson
2020-06-22 14:33 ` [dpdk-dev] [PATCH v2 0/4] improve runtime loading of shared drivers Bruce Richardson
2020-06-22 14:33   ` [dpdk-dev] [PATCH v2 1/4] eal: remove unnecessary null-termination Bruce Richardson
2020-06-22 14:33   ` [dpdk-dev] [PATCH v2 2/4] eal: only load shared libs from driver plugin directory Bruce Richardson
2020-06-22 14:33   ` [dpdk-dev] [PATCH v2 3/4] eal: don't load drivers from insecure paths Bruce Richardson
2020-06-22 14:33   ` [dpdk-dev] [PATCH v2 4/4] eal: cache last directory permissions checked Bruce Richardson
2020-07-02 21:13   ` [dpdk-dev] [PATCH v2 0/4] improve runtime loading of shared drivers Thomas Monjalon
2020-07-03 10:25     ` Bruce Richardson [this message]
2020-07-02 21:16   ` Thomas Monjalon
2020-07-03  8:33     ` Bruce Richardson
2020-07-03 10:23 ` [dpdk-dev] [PATCH v3 " Bruce Richardson
2020-07-03 10:23   ` [dpdk-dev] [PATCH v3 1/4] eal: remove unnecessary null-termination in plugin path Bruce Richardson
2020-07-03 10:23   ` [dpdk-dev] [PATCH v3 2/4] eal: load only shared libs from driver plugin directories Bruce Richardson
2020-07-03 10:23   ` [dpdk-dev] [PATCH v3 3/4] eal: forbid loading drivers from insecure paths Bruce Richardson
2020-07-03 10:23   ` [dpdk-dev] [PATCH v3 4/4] eal: cache last directory permissions checked Bruce Richardson
2020-07-05 17:50   ` [dpdk-dev] [PATCH v3 0/4] improve runtime loading of shared drivers Thomas Monjalon

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=20200703102527.GB620@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /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).