Skip to content
This repository was archived by the owner on May 31, 2021. It is now read-only.
This repository was archived by the owner on May 31, 2021. It is now read-only.

Consider allowing all torrent downloads to be restricted to a folder #588

@jr64

Description

@jr64

From a security point of view, it would be very nice to be able to restrict all torrent downloads to be within a folder, e.g. /var/data

Expected Behavior

There should be a configuration option where you can set a parent folder. Users can then only download to this folder and subfolders within it.

Current Behavior

You can download to any directory on the machine.

Context

Right now, you can download torrents to any directory the user rtorrent is running as has access to. This allows all users of flood to create or overwrite arbitrarily named files in arbitrary folders which is a security nightmare. It depends on the actual setup, but there are many ways this could be abused to get full access on the server. Here are some examples:

  • create a cronjob in /etc/cron.d that spawns a shell
  • add any ssh key to /home/$USER/.ssh/authorized_keys and login over ssh
  • overwrite /home/$USER/.bashrc to execute commands on the next login of the user
  • overwrite code of flood itself which will execute the next time it is restarted

At the very least, the README should contain a warning that any user of flood can most likely also get full access to the server. This might not be immediately obvious to some.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions