Title: Segfault when attrlist is a dict · Issue #599 · python-ldap/python-ldap · GitHub
Open Graph Title: Segfault when attrlist is a dict · Issue #599 · python-ldap/python-ldap
X Title: Segfault when attrlist is a dict · Issue #599 · python-ldap/python-ldap
Description: Passing a dict as attrlist to search_s() will result in memory corruption. See: python-ldap/Modules/LDAPObject.c Line 291 in 3957526 len = PySequence_Length(attrlist); len = PySequence_Length(attrlist); // len = -1 ... attrs[len] = NULL;...
Open Graph Description: Passing a dict as attrlist to search_s() will result in memory corruption. See: python-ldap/Modules/LDAPObject.c Line 291 in 3957526 len = PySequence_Length(attrlist); len = PySequence_Length(attrl...
X Description: Passing a dict as attrlist to search_s() will result in memory corruption. See: python-ldap/Modules/LDAPObject.c Line 291 in 3957526 len = PySequence_Length(attrlist); len = PySequence_Length(attrl...
Opengraph URL: https://github.com/python-ldap/python-ldap/issues/599
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Segfault when attrlist is a dict","articleBody":"Passing a dict as attrlist to search_s() will result in memory corruption.\n\nSee: https://github.com/python-ldap/python-ldap/blob/3957526fb1852e84b90f423d9fef34c7af25b85a/Modules/LDAPObject.c#L291\n\n```\nlen = PySequence_Length(attrlist); // len = -1\n...\nattrs[len] = NULL; // Out-of-bounds write\n```\nReplacing attrlist with seq will fix the problem:\n`\nlen = PySequence_Length(seq);\n`","author":{"url":"https://github.com/artuzap","@type":"Person","name":"artuzap"},"datePublished":"2025-10-13T11:44:45.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/599/python-ldap/issues/599"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:828f20b6-2ddf-740b-56ea-3abdff7b4364 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ED60:1DFAA9:6A5B63F:898DCE7:69758951 |
| html-safe-nonce | 95ead9797a8842112889ed78e17faf6c4c99e69097e15d2d17a3c3999425f0b2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRDYwOjFERkFBOTo2QTVCNjNGOjg5OERDRTc6Njk3NTg5NTEiLCJ2aXNpdG9yX2lkIjoiMzQ2MDY0ODQ2MDA0NDU2ODkxMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5b98d74b7e1ee9113cf0858fbc4fff49927eaa41c708496adcd4d9031c44d272 |
| hovercard-subject-tag | issue:3509722438 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-ldap/python-ldap/599/issue_layout |
| twitter:image | https://opengraph.githubassets.com/51f9e30c411f0c14c0385cadf03d2a235d2d8dcdec6180bb69a2dd861a2f0a85/python-ldap/python-ldap/issues/599 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/51f9e30c411f0c14c0385cadf03d2a235d2d8dcdec6180bb69a2dd861a2f0a85/python-ldap/python-ldap/issues/599 |
| og:image:alt | Passing a dict as attrlist to search_s() will result in memory corruption. See: python-ldap/Modules/LDAPObject.c Line 291 in 3957526 len = PySequence_Length(attrlist); len = PySequence_Length(attrl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | artuzap |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| turbo-cache-control | no-preview |
| go-import | github.com/python-ldap/python-ldap git https://github.com/python-ldap/python-ldap.git |
| octolytics-dimension-user_id | 33895877 |
| octolytics-dimension-user_login | python-ldap |
| octolytics-dimension-repository_id | 111794776 |
| octolytics-dimension-repository_nwo | python-ldap/python-ldap |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 111794776 |
| octolytics-dimension-repository_network_root_nwo | python-ldap/python-ldap |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width