Bug 1648388

Summary: amanda: review the use of the disk group for the amandabackup user
Product: [Fedora] Fedora Reporter: Tomas Hoger <thoger>
Component: amandaAssignee: Jason Tibbitts <j>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 35CC: fedora, jridky, j, phracek, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-12-13 15:12:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tomas Hoger 2018-11-09 15:20:34 UTC
Description of problem:

The amand packages create amandabackup user that has disk a the primary group and also belongs to the tape group.  The disk group membership give that user a full RW access to all partitions (as disk devices files under /dev allow rw access to the disk group), which effectively makes it root-equivalent.

Does amandabackup user require direct read or write access to disk that is not through one of its setuid root programs that would justify the disk group membership?  The upstream installation instructions do not seem to indicate any such requirement.

The disk group membership is also used to control access to the amanda setuid root programs, but it seems a dedicated group (maybe amandabackup just like the user) should be good enough for that.

It seems amandabackup is not intended to be root-equivalent, as the default configuration (as of version 3.3.9) does not allow it to perform restore (and hence overwrite arbitrary files).

It should be noted that the full read access to file system may be sufficient to escalate privileges (e.g. by stealing ssh private keys, or by stealing /etc/shadow for password cracking).  Noting this as even if it's possible to stop using the disk group, amandabackup will remain almost root equivalent.

Comment 2 Ben Cotton 2019-08-13 17:03:08 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 3 Ben Cotton 2019-08-13 19:40:06 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.

Comment 4 Jason Tibbitts 2019-08-13 20:17:14 UTC
As someone who has helped with maintenance of this software, I do find this somewhat troubling and went back through the history.

The spec has changed things around a bit in the intervening time, but %amanda_group macro has existed (and been set to disk) since 2006.  Before then the group was simply hardcoded to 'disk', and that dates back to 2004 which is as much history as we have besides some very old changelog entries.  And those suggest that the disk membership was there in the previous millennium.

So basically, I don't know why it's that way; Red Hat folks in the olden days decided it was needed and that was never changed.  I could certainly try changing it locally to see if anything breaks.  I do know that in much older Fedora releases (FC6 or F7 days) it was indeed mandatory that amandad on a client run in the disk group, but it's been a long time since I had any problems surrounding that.

Comment 5 Ben Cotton 2020-02-11 15:49:37 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 7 Fedora Program Management 2021-04-29 16:59:06 UTC
This message is a reminder that Fedora 32 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '32'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 32 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 8 Ben Cotton 2021-08-10 13:41:58 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 35 development cycle.
Changing version to 35.

Comment 9 Ben Cotton 2022-11-29 16:45:55 UTC
This message is a reminder that Fedora Linux 35 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '35'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 35 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 10 Ben Cotton 2022-12-13 15:12:42 UTC
Fedora Linux 35 entered end-of-life (EOL) status on 2022-12-13.

Fedora Linux 35 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.