Bug 1422057 - polkit-agent-helper-1 coredumps when stdin is closed for the password prompt
Summary: polkit-agent-helper-1 coredumps when stdin is closed for the password prompt
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: polkit
Version: 7.3
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Polkit Maintainers
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-14 11:56 UTC by Karel Srot
Modified: 2021-01-15 07:31 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-01-15 07:31:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Karel Srot 2017-02-14 11:56:44 UTC
Description of problem:

polkit-0.112-9.el7.x86_64

$ pkcheck -a org.freedesktop.policykit.exec -p $$ -u --enable-internal-agent==== AUTHENTICATING FOR org.freedesktop.policykit.exec ===
Authentication is required to run a program as another user
Authenticating as: karel
Password: 

Now press Ctrl+D which results in

** (pkcheck:3156): ERROR **: Got unexpected EOF while reading from controlling terminal.
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
Trace/breakpoint trap (core dumped)


(gdb) bt full
#0  g_logv (log_domain=0x0, log_level=G_LOG_LEVEL_ERROR, format=<optimized out>, 
    args=args@entry=0x7f82dbff4600) at gmessages.c:1086
        domain = 0x0
        data = 0x0
        depth = 0
        log_func = 0x7f82e02dcde0 <g_log_default_handler>
        domain_fatal_mask = <optimized out>
        masquerade_fatal = <optimized out>
        test_level = <optimized out>
        was_fatal = <optimized out>
        was_recursion = <optimized out>
        msg = 0x7f82d0002990 "Got unexpected EOF while reading from controlling terminal."
        msg_alloc = 0x7f82d0002990 "Got unexpected EOF while reading from controlling terminal."
        i = 2
#1  0x00007f82e02dd7bf in g_log (log_domain=log_domain@entry=0x0, 
    log_level=log_level@entry=G_LOG_LEVEL_ERROR, 
    format=format@entry=0x7f82e081bde8 "Got unexpected EOF while reading from controlling terminal.")
    at gmessages.c:1119
        args = {{gp_offset = 24, fp_offset = 48, overflow_arg_area = 0x7f82dbff46e0, 
            reg_save_area = 0x7f82dbff4620}}
#2  0x00007f82e081ab0f in on_request (session=0x7f82d4005300, request=<optimized out>, 
    echo_on=<optimized out>, user_data=<optimized out>) at polkitagenttextlistener.c:289
        c = <optimized out>
        listener = 0x7f82e2a98980
        ts = {c_iflag = 1280, c_oflag = 5, c_cflag = 191, c_lflag = 35331, c_line = 0 '\000', 
          c_cc = "\003\034\177\025\004\000\001\000\021\023\032\000\022\017\027\026", '\000' <repeats 15 times>, c_ispeed = 15, c_ospeed = 15}
        ots = {c_iflag = 1280, c_oflag = 5, c_cflag = 191, c_lflag = 35387, c_line = 0 '\000', 
          c_cc = "\003\034\177\025\004\000\001\000\021\023\032\000\022\017\027\026", '\000' <repeats 15 times>, c_ispeed = 15, c_ospeed = 15}
        str = 0x7f82d0001d40
---Type <return> to continue, or q <return> to quit---
#3  0x00007f82e05d3908 in g_closure_invoke (closure=0x7f82d0006740, return_value=return_value@entry=0x0, 
    n_param_values=3, param_values=param_values@entry=0x7f82dbff4920, 
    invocation_hint=invocation_hint@entry=0x7f82dbff48c0) at gclosure.c:801
        marshal = 0x7f82e08180a0 <_polkit_agent_marshal_VOID__STRING_BOOLEAN>
        marshal_data = 0x0
        in_marshal = 0
        real_closure = 0x7f82d0006720
        __FUNCTION__ = "g_closure_invoke"
#4  0x00007f82e05e5a1d in signal_emit_unlocked_R (node=node@entry=0x7f82d00063b0, detail=detail@entry=0, 
    instance=instance@entry=0x7f82d4005300, emission_return=emission_return@entry=0x0, 
    instance_and_params=instance_and_params@entry=0x7f82dbff4920) at gsignal.c:3627
        tmp = <optimized out>
        handler = 0x7f82d4003d80
        accumulator = 0x0
        emission = {next = 0x0, instance = 0x7f82d4005300, ihint = {signal_id = 8, detail = 0, 
            run_type = G_SIGNAL_RUN_FIRST}, state = EMISSION_RUN, chain_type = 4}
        class_closure = 0x0
        handler_list = 0x7f82d4003d80
        return_accu = 0x0
        accu = {g_type = 0, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, 
              v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, 
              v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
        signal_id = 8
        max_sequential_handler_number = 17
        return_value_altered = 0
#5  0x00007f82e05edab1 in g_signal_emit_valist (instance=instance@entry=0x7f82d4005300, 
    signal_id=signal_id@entry=8, detail=detail@entry=0, var_args=var_args@entry=0x7f82dbff4b48)
    at gsignal.c:3383
        instance_and_params = 0x7f82dbff4920
        signal_return_type = <optimized out>
        param_values = 0x7f82dbff4938
---Type <return> to continue, or q <return> to quit---
        node = <optimized out>
        i = <optimized out>
        n_params = <optimized out>
        __FUNCTION__ = "g_signal_emit_valist"
#6  0x00007f82e05ee2e8 in g_signal_emit_by_name (instance=instance@entry=0x7f82d4005300, 
    detailed_signal=detailed_signal@entry=0x7f82e081aeb2 "request") at gsignal.c:3479
        var_args = {{gp_offset = 32, fp_offset = 48, overflow_arg_area = 0x7f82dbff4c80, 
            reg_save_area = 0x7f82dbff4b90}}
        detail = 0
        signal_id = 8
        itype = 140199812154480
        __FUNCTION__ = "g_signal_emit_by_name"
#7  0x00007f82e08189e2 in io_watch_have_data (channel=<optimized out>, condition=G_IO_IN, 
    user_data=<optimized out>) at polkitagentsession.c:483
        s = <optimized out>
        session = 0x7f82d4005300
        line = 0x7f82d0002810 "PAM_PROMPT_ECHO_OFF Password: "
        unescaped = 0x7f82d0002920 "PAM_PROMPT_ECHO_OFF Password: "
        error = 0x0
#8  0x00007f82e02d6d7a in g_main_dispatch (context=0x7f82d0001500) at gmain.c:3152
        dispatch = 0x7f82e0319d30 <g_io_unix_dispatch>
        prev_source = 0x0
        was_in_call = 0
        user_data = 0x7f82d4005300
        callback = 0x7f82e0818810 <io_watch_have_data>
        cb_funcs = 0x7f82e05c28c0 <g_source_callback_funcs>
        cb_data = 0x7f82d0007a30
        need_destroy = <optimized out>
        source = 0x7f82d0007990
        current = 0x7f82d0001100
        i = 0
---Type <return> to continue, or q <return> to quit---
#9  g_main_context_dispatch (context=context@entry=0x7f82d0001500) at gmain.c:3767
No locals.
#10 0x00007f82e02d70b8 in g_main_context_iterate (context=0x7f82d0001500, block=block@entry=1, 
    dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3838
        max_priority = 2147483647
        timeout = -1
        some_ready = 1
        nfds = <optimized out>
        allocated_nfds = 2
        fds = 0x7f82d00017e0
#11 0x00007f82e02d738a in g_main_loop_run (loop=0x7f82d00010e0) at gmain.c:4032
        __FUNCTION__ = "g_main_loop_run"
#12 0x00007f82e08193b4 in server_thread_func (user_data=0x7f82e2aad030) at polkitagentlistener.c:361
        server = 0x7f82e2aad030
#13 0x00007f82e02fc0f5 in g_thread_proxy (data=0x7f82e2aaa800) at gthread.c:778
        thread = 0x7f82e2aaa800
#14 0x00007f82e0078dc5 in start_thread (arg=0x7f82dbff5700) at pthread_create.c:308
        __res = <optimized out>
        pd = 0x7f82dbff5700
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140200013420288, 3112830144382713697, 0, 
                140200013420992, 140200013420288, 140200125321264, -3154972231951499423, 
                -3154984255800131743}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {
              prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
        pagesize_m1 = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>
#15 0x00007f82dfda773d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
No locals.

Comment 1 Miloslav Trmač 2017-02-14 15:15:45 UTC
Thanks for your report. If I am not mistaken, it is still possible to enter an empty password by just pressing Enter; but canceling the prompt / closing the input does abort the process.

Comment 2 Karel Srot 2017-02-14 15:21:18 UTC
Correct.

Comment 7 RHEL Program Management 2021-01-15 07:31:51 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.


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