{"record":{"id":"c6795c74cf3696a5","repo":"moonD4rk/HackBrowserData","slug":"open-session-w","errorCode":null,"errorMessage":"open session: %w","messagePattern":"open session: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"masterkey/retriever_linux.go","lineNumber":38,"sourceCode":"\n// DBusRetriever queries GNOME Keyring / KDE Wallet via D-Bus Secret Service.\ntype DBusRetriever struct{}\n\nfunc (r *DBusRetriever) RetrieveKey(hints Hints) ([]byte, error) {\n\tstorage := hints.KeychainLabel\n\tconn, err := dbus.SessionBus()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"dbus session: %w\", err)\n\t}\n\n\tsvc, err := keyring.GetSecretService(conn)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"secret service: %w\", err)\n\t}\n\n\tsession, err := svc.OpenSession()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"open session: %w\", err)\n\t}\n\tdefer session.Close()\n\n\tcollections, err := svc.GetAllCollections()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"get collections: %w\", err)\n\t}\n\n\tfor _, col := range collections {\n\t\titems, err := col.GetAllItems()\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\t\tfor _, item := range items {\n\t\t\tlabel, err := item.GetLabel()\n\t\t\tif err != nil {\n\t\t\t\tcontinue\n\t\t\t}","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/moonD4rk/HackBrowserData/blob/0503d04d7a8d0379d060268a74f1b149e5a0aad5/masterkey/retriever_linux.go#L20-L56","documentation":"Connected to the Secret Service, but opening the per-call crypto session (org.freedesktop.Secret.Service.OpenSession with a plain DH/AES algorithm) failed. Without a session no secrets can be read or transferred.","triggerScenarios":"svc.OpenSession() returns an error: the keyring daemon rejects the session algorithm, the service is in a bad state, or the D-Bus call is rejected (service busy, daemon restarting, SELinux/AppArmor denial).","commonSituations":"gnome-keyring-daemon mid-restart or wedged after login; hardened MAC policies (SELinux/AppArmor) blocking Secret Service method calls; incompatible/unusual keyring implementations on minimal systems.","solutions":["Restart the keyring daemon: killall gnome-keyring-daemon then log out/in (or gnome-keyring-daemon --start --components=secrets)","Re-run the tool — transient daemon states often clear on retry","Check audit logs for SELinux/AppArmor denials and add allow rules for the Secret Service interface","Test manually with secret-tool (libsecret) to confirm the service can open sessions at all"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"null","typeGuard":null,"tryCatchPattern":"key, err := dbusRetriever.RetrieveKey(hints)\nif err != nil && strings.HasPrefix(err.Error(), \"open session:\") {\n    time.Sleep(time.Second) // keyring daemon may be restarting\n    key, err = dbusRetriever.RetrieveKey(hints)\n    if err != nil { key, _ = posixRetriever.RetrieveKey(hints) }\n}","preventionTips":["Retry once after a short delay — daemon restarts and suspend/resume cause transient session failures","Restart gnome-keyring-daemon if sessions repeatedly fail to open","Check SELinux/AppArmor denials in audit logs on hardened systems","Fall back to PosixRetriever for v10-only profiles"],"tags":["linux","dbus","secret-service","session"],"backgroundTag":"database-query-failed","analyzedSha":"0503d04d7a8d0379d060268a74f1b149e5a0aad5","analyzedAt":"2026-09-06T13:38:28.707Z","contentChangedAt":"2026-09-06T13:38:28.707Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}