Bug 883947 - sssd: potential LDAP filter injection issues
sssd: potential LDAP filter injection issues
Product: Fedora
Classification: Fedora
Component: sssd (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jakub Hrozek
Fedora Extras Quality Assurance
Depends On:
Blocks: 882335
  Show dependency treegraph
Reported: 2012-12-05 11:00 EST by Florian Weimer
Modified: 2015-07-15 10:55 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Florian Weimer 2012-12-05 11:00:28 EST
I went through the sssd 1.9.2 source code and identified potential LDAP filter injection issues:

src/providers/ldap/ldap_auth.c: get_user_dn() username
src/providers/ldap/sdap_sudo.c: sdap_sudo_build_host_filter() hostnames, ip_addr
src/providers/ldap/sdap_async_groups.c: sdap_process_missing_member_2307() member_name
src/providers/ldap/ldap_id_cleanup.c: cleanup_groups() dn
src/providers/ldap/ldap_id_cleanup.c: netgr_translate_members_send() dn_item->dn
src/providers/ipa/ipa_hosts.c: ipa_host_info_send() hostname
src/tools/sss_cache.c: init_context() user, group, netgroup, map
src/tools/sss_groupshow.c: group_show_trim_memberof() memberofs, dn
src/db/sysdb_ssh.c: sysdb_get_ssh_host() name
src/db/sysdb_ops.c: sysdb_add_user() name, alias_el->values[i].data
src/db/sysdb_ops.c: sysdb_delete_user() name
src/db/sysdb_sudo.c: sysdb_get_sudo_filter() username, groupnames

(Format is file name, function name, variable name)

The situation is a bit like SQL injection, except that LDAP filters should not be as powerful as SQL statements, so this is probably just a correctness issue and not a security problem (unless it allows altering the results of queries in interesting ways).  An interface which separates query parameters from the query structure would be desirable as a replacement for all this string concatenation.
Comment 1 Jakub Hrozek 2012-12-06 04:31:57 EST
Upstream ticket:
Comment 2 Fedora End Of Life 2013-12-21 10:14:05 EST
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. 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 WONTFIX if it remains open with a Fedora 
'version' of '18'.

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 prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 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 to Fedora 18's end of life.

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 3 Jakub Hrozek 2013-12-23 07:21:57 EST
We are tracking this issue upstream, currently slated for 1.13, so I'll move the version to rawhide (normally I'd close/upstream, but apparently there is some tracker blocked by this bz)
Comment 4 Jan Kurik 2015-07-15 10:55:28 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:

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