Skip to content

Conversation

@cosmo0920
Copy link

Currently, sigdump uses predictable path to write object dump.
But, in some circumstances, this implementation makes a vulnerability for dangling symlink attack.
And also, Kernel.open should use 0644 instead of 0666(wolrd-writable permission).
This will be also vulnerability part of dangling symlink attack.

cosmo0920 added 2 commits May 21, 2021 13:50
Fluentd usually uses predictable paths for dumping object information.

However, if systemd manages fluentd, it will send a SIGCONT to fluentd
when the managed service is stopped or restarted (see 'man systemd.kill').
Thus, if a malicious link(s) are in place in /tmp, the attack will eventually be triggered.

Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
0666 is the default permission for Kernel.open.
But it shouldn't be used because we should use minimal permission.
If we use default permission for dumping target path,
dangling linked file is provided for target path which shouldn't be created
elevated parmission having file, that is, world-writable permitted
file.

Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
@cosmo0920
Copy link
Author

cosmo0920 commented May 21, 2021

@frsyuki Could you kindly take a look if you have a time?
If you don't have enough time to maintain this gem, we can handle issues/PRs on @fluent-plugins-nursery:
https://github.com/fluent-plugins-nursery/contact

We think that maintainace of this gem is important for Fluentd community.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant