RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 677665 - pinentry-ncurses fails if current tty is owned by different user as the one running pinentry
Summary: pinentry-ncurses fails if current tty is owned by different user as the one r...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: pinentry
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Stanislav Ochotnicky
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On: 677670
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-15 14:23 UTC by Miroslav Vadkerti
Modified: 2018-11-27 21:24 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Prior to this update, there was a problem when entering a password using the pinentry-curses utility; an error message was displayed instead of the password entry dialog if pinentry-curses was run under a user different from the user who owned the current tty. This bug has been fixed in this update so that no error message is now displayed and pinentry-curses asks for a password as expected.
Clone Of:
: 677670 (view as bug list)
Environment:
Last Closed: 2011-07-27 08:14:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch fixing the bug (3.17 KB, patch)
2011-02-15 14:29 UTC, Stanislav Ochotnicky
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1096 0 normal SHIPPED_LIVE pinentry bug fix update 2011-07-27 08:14:20 UTC

Description Miroslav Vadkerti 2011-02-15 14:23:25 UTC
Description of problem:
pinentry-ncurses fails if current tty is owned by different user
as the one running pinentry. This happens for example when users does "su -"
after logging in as normal user. The /dev/pts/XX file is not chown-ed to root
and therefore pinentry-ncurses fails

Version-Release number of selected component (if applicable):
pinentry-0.7.6-5.el6

How reproducible:
100%

Steps to Reproduce:
# ssh to a box as a normal user
# unset DISPLAY
# su -
# dd if=/dev/urandom of=testpartition bs=1M count=10
# losetup /dev/loop0 testpartition
# cryptsetup luksFormat /dev/loop0
(enter password)
# volume_key --save /dev/loop0 -o packet
  
Actual results:
volume_key: Error creating `packet': GPGME: Bad passphrase

Expected results:
No error and pinentry asks for password

Additional info:
Patch sent upstream by sochotni

Comment 1 Stanislav Ochotnicky 2011-02-15 14:26:46 UTC
More simple reproducer is this:
1. login as normal user
2. unset DISPLAY # to use curses 
3. su -
4. gpg2 --symmetric .bashrc

Comment 2 Stanislav Ochotnicky 2011-02-15 14:29:28 UTC
Created attachment 478883 [details]
Patch fixing the bug

This is patch that was sent upstream. Will be back after I hear back from them

Comment 3 RHEL Program Management 2011-02-15 14:37:57 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 4 Stanislav Ochotnicky 2011-04-19 08:02:04 UTC
Additional information from upstream: capabilities are not supported for a long time, they were surprised it worked and that it was enabled by default in their configuration. They will be turning it off for next release. Testing on Fedoras suggests no problems when package was configured with --without-libcap.

Comment 5 Petr Kovar 2011-07-04 16:58:49 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Prior to this update, there was a problem when entering a password using the pinentry-curses utility; an error message was displayed instead of the password entry dialog if pinentry-curses was run under a user different from the user who owned the current tty. This bug has been fixed in this update so that no error message is now displayed and pinentry-curses asks for a password as expected.

Comment 8 errata-xmlrpc 2011-07-27 08:14:26 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1096.html


Note You need to log in before you can comment on or make changes to this bug.