From: Yann Droneaud <ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Yann Droneaud <ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
Subject: [PATCH libibverbs v2 00/11] make read_config() more robust
Date: Thu, 8 Aug 2013 21:40:43 +0200 [thread overview]
Message-ID: <cover.1375952089.git.ydroneaud@opteya.com> (raw)
Hi,
Please find patches to protect libibverbs from using invalid,
unsecure configuration files.
Thoses configurations files are usually located in
/etc/libibverbs.d/ and contains the name of a shared library
to dlopen().
Only legitimate shared libraries should be loaded by libibverbs,
so it must be careful on the configuration files used.
Changes from v1:
- rewrote the way files are accessed to use openat()
- made the ownership/permissions checking allow access to user owned files.
- reject symlinks
Yann Droneaud (11):
read_config(): ignore files beginning with '.'
read_config(): ignore directory entry with backup suffix (~)
read_config(): open configuration directory with open()
read_config(): move file type check in read_config_file()
read_config_file(): use the directory file descriptor to open
configuration file
read_config_file(): check opened file
read_config(): check opened directory
read_config(): refuse to open IBV_CONFIG_DIR if it's not a directory
Check owner/permissions of config directory/files
read_config(): reject symlinks
read_config_file(): refuse to open configuration file if it's symlink
configure.ac | 12 ++++++
src/init.c | 135 ++++++++++++++++++++++++++++++++++++++++++++++++-----------
2 files changed, 123 insertions(+), 24 deletions(-)
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2013-08-08 19:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-08 19:40 Yann Droneaud [this message]
[not found] ` <cover.1375952089.git.ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
2013-08-08 19:40 ` [PATCH libibverbs v2 01/11] read_config(): ignore files beginning with '.' Yann Droneaud
2013-08-08 19:40 ` [PATCH libibverbs v2 02/11] read_config(): ignore directory entry with backup suffix (~) Yann Droneaud
2013-08-08 19:40 ` [PATCH libibverbs v2 03/11] read_config(): open configuration directory with open() Yann Droneaud
2013-08-08 19:40 ` [PATCH libibverbs v2 04/11] read_config(): move file type check in read_config_file() Yann Droneaud
2013-08-08 19:40 ` [PATCH libibverbs v2 05/11] read_config_file(): use the directory file descriptor to open configuration file Yann Droneaud
2013-08-08 19:40 ` [PATCH libibverbs v2 06/11] read_config_file(): check opened file Yann Droneaud
2013-08-08 19:40 ` [PATCH libibverbs v2 07/11] read_config(): check opened directory Yann Droneaud
2013-08-08 19:40 ` [PATCH libibverbs v2 08/11] read_config(): refuse to open IBV_CONFIG_DIR if it's not a directory Yann Droneaud
[not found] ` <64fd9c35244a9d3ed56f77b049accb00b9ec95e9.1375952089.git.ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
2013-08-12 19:29 ` Jason Gunthorpe
2013-08-08 19:40 ` [PATCH libibverbs v2 09/11] Check owner/permissions of config directory/files Yann Droneaud
2013-08-08 19:40 ` [PATCH libibverbs v2 10/11] read_config(): reject symlinks Yann Droneaud
2013-08-08 19:40 ` [PATCH libibverbs v2 11/11] read_config_file(): refuse to open configuration file if it's symlink Yann Droneaud
2013-08-12 19:26 ` [PATCH libibverbs v2 00/11] make read_config() more robust Jason Gunthorpe
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=cover.1375952089.git.ydroneaud@opteya.com \
--to=ydroneaud-rly5vtjfyj3qt0dzr+alfa@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox