Skip to content

Fixed a Secret Service Integration connection dereferencing a nullptr in some cases - #13655

Open
ryain11 wants to merge 2 commits into
keepassxreboot:developfrom
ryain11:develop
Open

Fixed a Secret Service Integration connection dereferencing a nullptr in some cases#13655
ryain11 wants to merge 2 commits into
keepassxreboot:developfrom
ryain11:develop

Conversation

@ryain11

@ryain11 ryain11 commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

FIX FOR #13265

This PR resolves the issue where Secret Service request to unlock the database crashes keepassxc in some cases.

The crash happens because if "Prompt to unlock database before searching" option in SSI is enabled, search requests prompt a database unlock prompt. And if by any chance the database is already unlocked, !m_unlockingAnyDatabase evaluates to true, causing an if statement in a file to evaluate to false. so the function does not return and tries to connect() a value that is nullptr. And the program crashes.

Screenshots

Database locked:
Screenshot_20260907_164145

As shown, it doesnt cause any problem, but when the database is unlocked:
Screenshot_20260907_164057

The program crashes with the output:
image

Warning

I couldn't verify if the fix actually fully applies to the reporter's exact problem. If the issue persists, I will try to implement another fix.

Testing strategy

I issued a repeated D-Bus search request on a terminal to reproduce the issue. Then asked AI to find the root cause and implemented a fix.

Type of change

  • ✅ Bug fix (non-breaking change that fixes an issue)

@ryain11 ryain11 changed the title Fixed a Secret Service Integration message being null in some cases w… Fixed a Secret Service Integration message being nullptr in some cases Sep 7, 2026
@ryain11 ryain11 changed the title Fixed a Secret Service Integration message being nullptr in some cases Fixed a Secret Service Integration connection dereferencing a nullptr in some cases Sep 7, 2026
@ryain11

ryain11 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

MacOS build is failing. Is it related to the code or is the test runner flaky?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants