[PATCHSET 0/2] xfs: constify dotdot global variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I was auditing the code base when I noticed that the xfs_name_dotdot
variable is both global and mutable.  In theory, someone could change
the contents of that variable (either through misuse or by exploiting a
kernel bug) which would then break the directory code, so let's shut
down that attack surface by making it const.

If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.

This is an extraordinary way to destroy everything.  Enjoy!
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=constify-dotdot-5.18
---
 fs/xfs/libxfs/xfs_dir2.c      |   18 +++++++++++-------
 fs/xfs/libxfs/xfs_dir2.h      |    6 +++---
 fs/xfs/libxfs/xfs_dir2_priv.h |    5 +++--
 fs/xfs/scrub/parent.c         |    6 ++++--
 fs/xfs/xfs_export.c           |    3 ++-
 5 files changed, 23 insertions(+), 15 deletions(-)




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux