Bug 13729 - 'pam_authenticate' get crashed with segmentation fault for SAMBA DC or AD user when 'userWorkstations' property is set
Summary: 'pam_authenticate' get crashed with segmentation fault for SAMBA DC or AD use...
Status: NEW
Alias: None
Product: mod_auth_ntlm_winbind
Classification: Unclassified
Component: module (show other bugs)
Version: 0.1
Hardware: All Linux
: P1 critical
Target Milestone: ---
Assignee: Samba Bugzilla Account
QA Contact: Samba Bugzilla Account
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-21 09:23 UTC by Mukhtar
Modified: 2019-01-04 12:40 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mukhtar 2018-12-21 09:23:28 UTC
pam_authenticate() get crashed with segmentation fault for Active Directory user when 'userWorkstations' property is set.

code snippet:
------------------------------------------
struct pam_response *poPamResponse = NULL;
int PAMConversationFunction
(
int num_msg,
const struct pam_message **msg,
struct pam_response **resp,
void *appdata_ptr
)
{
*resp = pPam_response;
return PAM_SUCCESS;
}
void fun()
{
...
const struct pam_conv pam_conversation = { PAMConversationFunction, NULL };
pam_handle_t *pPam_auth_handle = NULL;
returnval = pam_start("passwd", pstr_user_name, &pam_conversation, &pPam_auth_handle );
pPam_response = (struct pam_response *)malloc(sizeof(struct pam_response));
pPam_response[0].resp = strdup(pstr_password);
pPam_response[0].resp_retcode = 0;
retval = pam_authenticate(pPam_auth_handle , PAM_DISALLOW_NULL_AUTHTOK);
if (retval == PAM_SUCCESS)
{
retval = pam_acct_mgmt(pPam_auth_handle , PAM_DISALLOW_NULL_AUTHTOK)
}
...
}
------------------------------------------

In above code snippet the function 'pam_authenticate()' getting crashed below is the back-trace for it:
[root@centOS7_x86_64 abrt]# cat ccpp-2018-12-19-20:48:43-3976/core_backtrace
{ "signal": 11
, "executable": "/usr/app_name/bin/pamAuthTest"
, "stacktrace":
[ { "crash_thread": true
, "frames":
[ { "address": 140408375291910
, "build_id": "b04a54c443d36058702ab4060c63f4ab3273eae9"
, "build_id_offset": 1253382
, "function_name": "__strcmp_sse42"
, "file_name": "/lib64/libc.so.6"
}
, { "address": 140408390019396
, "build_id": "b8c28d3a423ca606820b991ad82c3b6d86de6b09"
, "build_id_offset": 10564
, "function_name": "_pam_locate_data"
, "file_name": "/lib64/libpam.so.0"
}
, { "address": 140408390019502
, "build_id": "b8c28d3a423ca606820b991ad82c3b6d86de6b09"
, "build_id_offset": 10670
, "function_name": "pam_set_data"
, "file_name": "/lib64/libpam.so.0"
}
, { "address": 140408177247691
, "build_id": "a1a6df0413dd7702b14fb1acef236bca7c24703d"
, "build_id_offset": 21963
, "function_name": "pam_sm_authenticate"
, "file_name": "/usr/lib64/security/pam_winbind.so"
}
, { "address": 140408390020970
, "build_id": "b8c28d3a423ca606820b991ad82c3b6d86de6b09"
, "build_id_offset": 12138
, "function_name": "_pam_dispatch"
, "file_name": "/lib64/libpam.so.0"
}
, { "address": 140408390019120
, "build_id": "b8c28d3a423ca606820b991ad82c3b6d86de6b09"
, "build_id_offset": 10288
, "function_name": "pam_authenticate"
, "file_name": "/lib64/libpam.so.0"
}
, { "address": 4229032
, "build_id_offset": 34728
, "function_name": "main"
, "file_name": "/usr/app_name/bin/pamAuthTest"
} ]
} ]
}
Comment 1 Mukhtar 2018-12-24 08:53:49 UTC
Please note:
* The user for which this issue is occurring is a SAMBE DC user and not the Active Directory user.
SAMBA DC is configured on Linux CentOS

Configuration
SAMBA DC is configured on Linux Ubuntu 16.04
NVBU is hosted on Linux Machine which integrated with SAMBA DC using 'winbind'.
Note: Need to check if the same issue has occurred in case SAMBA DC is configured on other Linux machine.
Comment 2 Mukhtar 2018-12-24 10:33:46 UTC
The same crash is observed even if the user is Active Directory user and the user property 'userWorkstations' has set