Skip to content

Pygrub security enhancements and bugfixes

Alejandro Vallejo xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6tools/pygrub: Set mount propagation to private recursivelytools/pygrub/src/pygrub+9 -53 replies
2/6tools/pygrub: Fix bug in LIMIT_FSIZE env variable overridetools/pygrub/src/pygrub+1 -15 replies
3/6tools/pygrub: Restrict depriv operation with RLIMIT_AStools/pygrub/src/pygrub+10 -02 replies
4/6tools/libfsimage: Add an fdopen() interface to libfsimagetools/libfsimage/common/fsimage.c tools/libfsimage/common/fsimage_grub.c tools/libfsimage/common/fsimage_plugin.c +6 more+56 -182 replies
5/6tools/pygrub: Expose libfsimage's fdopen() to pythontools/pygrub/src/fsimage/fsimage.c+33 -02 replies
6/6tools/pygrub: Hook libfsimage's fdopen() to pygrubdocs/man/xl.cfg.5.pod.in tools/pygrub/src/ExtLinuxConf.py tools/pygrub/src/GrubConf.py +2 more+68 -1021 reply

Reviews trailers per patch

3 of 6 patches have a Reviewed-by or Acked-by.

PatchAndrew CooperAlejandro Vallejo
1/6A-b
2/6R-b
3/6A-b
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/6] Pygrub security enhancements and bugfixes

A few extra bugfixes and security enhancements for pygrub.

The biggest security enhacement is the removal of filesystem permissions from the depriv thread of pygrub. This is possible on newer versions of e2fsprogs, as it has an interface to consume file descriptors rather than file paths.

Bug fixes
=========

Patch 1: Properly confines the mount namespace in Linux systems and
corrects an incorrect statement about older Linux kernels being buggy with them. With this patch, mounts done inside the namespace disappear altogether after the last process is killed.
Patch 2: Fixes a bug preventing setting the LIMIT_FSIZE override

Security enhancements
=====================

Patch 3: Limits the amount of memory pygrub can chew
Patch 4: Tweaks libfsimage to support a new interface ( fdopen() ) which
allows passing file descriptors rather than paths
Patch 5: Modifies the python bindings to grant access to the new interface Patch 6: Modifies pygrub to open every required file before depriv.

Alejandro Vallejo (6):
tools/pygrub: Set mount propagation to private recursively tools/pygrub: Fix bug in LIMIT_FSIZE env variable override tools/pygrub: Restrict depriv operation with RLIMIT_AS tools/libfsimage: Add an fdopen() interface to libfsimage tools/pygrub: Expose libfsimage's fdopen() to python tools/pygrub: Hook libfsimage's fdopen() to pygrub

 docs/man/xl.cfg.5.pod.in                    |   6 +-
 tools/libfsimage/common/fsimage.c           |  42 ++++++--
 tools/libfsimage/common/fsimage_grub.c      |   2 +-
 tools/libfsimage/common/fsimage_plugin.c    |   4 +-
 tools/libfsimage/common/fsimage_priv.h      |   3 +-
 tools/libfsimage/common/mapfile-GNU         |   2 +
 tools/libfsimage/common/mapfile-SunOS       |   2 +
 tools/libfsimage/common/xenfsimage.h        |   3 +
 tools/libfsimage/common/xenfsimage_plugin.h |   2 +-
 tools/libfsimage/ext2fs-lib/ext2fs-lib.c    |  14 ++-
 tools/pygrub/src/ExtLinuxConf.py            |  20 ++--
 tools/pygrub/src/GrubConf.py                |  29 ++---
 tools/pygrub/src/LiloConf.py                |  20 ++--
 tools/pygrub/src/fsimage/fsimage.c          |  33 ++++++
 tools/pygrub/src/pygrub                     | 113 +++++++-------------
 15 files changed, 173 insertions(+), 122 deletions(-)
Signature · 1 line
2.34.1