make read_config() more robust
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest11 patches 2 repliesIn review
- v13 patches 9 repliesSuperseded
Changes in v2 from the cover letter
- rewrote the way files are accessed to use openat()
- made the ownership/permissions checking allow access to user owned files.
- reject symlinks
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | read_config(): ignore files beginning with '.'src/ | +3 | 0 replies | |
| 2/11 | read_config(): ignore directory entry with backup suffix (~)src/ | +3 | 0 replies | |
| 3/11 | read_config(): open configuration directory with open()src/ | +11 | 0 replies | |
| 4/11 | read_config(): move file type check in read_config_file()src/ | +14 | 0 replies | |
| 5/11 | read_config_file(): use the directory file descriptor to open configuration filesrc/ | +26 | 0 replies | |
| 6/11 | read_config_file(): check opened filesrc/ | +9 | 0 replies | |
| 7/11 | read_config(): check opened directorysrc/ | +19 | 0 replies | |
| 8/11 | read_config(): refuse to open IBV_CONFIG_DIR if it's not a directoryconfigure.ac src/ | +7 | 1 reply | |
| 9/11 | Check owner/permissions of config directory/filessrc/ | +35 | 0 replies | |
| 10/11 | read_config(): reject symlinkssrc/ | +12 | 0 replies | |
| 11/11 | read_config_file(): refuse to open configuration file if it's symlinkconfigure.ac src/ | +7 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH libibverbs v2 00/11] make read_config() more robust
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(-)
Signature · 5 lines
1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html