<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>421856</bug_id>
          
          <creation_ts>2020-05-21 10:07:53 +0000</creation_ts>
          <short_desc>KWallet does not accept correct password</short_desc>
          <delta_ts>2021-07-26 08:17:45 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>Frameworks and Libraries</classification>
          <product>frameworks-kwallet</product>
          <component>general</component>
          <version>5.18.0</version>
          <rep_platform>Neon</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CONFIRMED</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.kde.org/show_bug.cgi?id=345412</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Venca B Spam">vbspam</reporter>
          <assigned_to name="Valentin Rusu">valir</assigned_to>
          <cc>chriscz93</cc>
    
    <cc>kdebugs</cc>
    
    <cc>kdelibs-bugs-null</cc>
    
    <cc>popov895</cc>
    
    <cc>sephiroth_pk</cc>
    
    <cc>shantanu</cc>
    
    <cc>tomas.teijeiro</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1931524</commentid>
    <comment_count>0</comment_count>
    <who name="Venca B Spam">vbspam</who>
    <bug_when>2020-05-21 10:07:53 +0000</bug_when>
    <thetext>SUMMARY

Let&apos;s have Neon testing fully working. The KWallet is used to store all your passwords. The KWallet is configured to be automatically unlocked after login.


STEPS TO REPRODUCE
1. Update your system by &apos;apt dist-upgrade&apos; 
2. Restart the system
3. Login as usually

OBSERVED RESULT

The KWallet prompts you to enter password to kwallet. Even when you enter the correct password, it responds with message &quot;Error code -9: Read error - possibly incorrect password.&quot;
 
EXPECTED RESULT

The system should not forget all my passwords after update/upgrade.


SOFTWARE/OS VERSIONS
Operating System: KDE neon Testing Edition
KDE Plasma Version: 5.18.90
KDE Frameworks Version: 5.71.0
Qt Version: 5.14.2
Kernel Version: 4.15.0-101-generic
OS Type: 64-bit
Wallet Manager: Version 20.04.1

ADDITIONAL INFORMATION</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1931526</commentid>
    <comment_count>1</comment_count>
    <who name="Venca B Spam">vbspam</who>
    <bug_when>2020-05-21 10:14:30 +0000</bug_when>
    <thetext>There is workaround how to save your data.

Let&apos;s have another system with Neon, just without the latest update/upgrade, call it healthy.

Take the kdewallet.kwl kdewallet.salt and copy it over the healthy system files.

Open KWallet manager on the healthy system and enter the correct password to open it.

Export the opened wallet to XML (e.g. recovered_wallet.xml) .

Go to the sick system, delete the kdewallet.kwl kdewallet.salt and restart the system.

Once you login on the sick system, open the KWallet manager and import the &quot;recovered_wallet.xml&quot;.

This should fix the thing.

Hope it saves other people, as this critical issue can&apos;t be prevented by any backups or archives at all.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1931528</commentid>
    <comment_count>2</comment_count>
    <who name="Venca B Spam">vbspam</who>
    <bug_when>2020-05-21 10:20:39 +0000</bug_when>
    <thetext>This might be related to this issue https://bugs.kde.org/show_bug.cgi?id=416461 . They however also deal with problem with unlocking of the KWallet on login, which in this case works, after fixing the wallet password.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1932606</commentid>
    <comment_count>3</comment_count>
    <who name="Chris Coetzee">chriscz93</who>
    <bug_when>2020-05-25 22:04:16 +0000</bug_when>
    <thetext>I&apos;m experiencing the exact same problem after updating Neon tonight. Looks like my package versions are the same. 

I tried downgrading libkwalletbackend5-5, but I couldn&apos;t without breaking other packages.

I didn&apos;t dig deep for the official sources, but I saw this commit on kwaller Github project, and it looks like a byte-order change in the encryption may have caused this.

https://github.com/KDE/kwallet/blame/master/src/runtime/kwalletd/backend/blowfish.cc

SOFTWARE/OS VERSIONS
Operating System: KDE neon Testing Edition
KDE Plasma Version: 5.18.90
KDE Frameworks Version: 5.71.0
Qt Version: 5.14.2
Kernel Version: 4.15.0-101-generic
OS Type: 64-bit
Wallet Manager: Version 20.04.1
Wallet Backend: Version 5.70.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1932627</commentid>
    <comment_count>4</comment_count>
      <attachid>128789</attachid>
    <who name="Chris Coetzee">chriscz93</who>
    <bug_when>2020-05-25 23:44:35 +0000</bug_when>
    <thetext>Created attachment 128789
Patch for endianness

I followed build instructions to get KWallet building here:

- https://community.kde.org/KDevelop/HowToCompile_v5 and
- https://community.kde.org/Guidelines_and_HOWTOs/Build_from_source/Details

I looked up several stackoverflow articles on determining endianness from standard headers, some suggested looking in BOOST, but I found that there&apos;s an `endian.h&apos; header on Linux and Mac systems. 

Therefore the patch likely needs revisiting to make it compatible with other platforms / compilers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1932630</commentid>
    <comment_count>5</comment_count>
    <who name="Chris Coetzee">chriscz93</who>
    <bug_when>2020-05-26 00:07:42 +0000</bug_when>
    <thetext>Corresponding Phabricator revision: https://phabricator.kde.org/D29832</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1932666</commentid>
    <comment_count>6</comment_count>
    <who name="Chris Coetzee">chriscz93</who>
    <bug_when>2020-05-26 07:17:45 +0000</bug_when>
    <thetext>Looks like patches and things are now moving to Gitlab, so here&apos;s the PR there https://invent.kde.org/frameworks/kwallet/-/merge_requests/1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1935010</commentid>
    <comment_count>7</comment_count>
    <who name="Venca B Spam">vbspam</who>
    <bug_when>2020-06-07 07:33:56 +0000</bug_when>
    <thetext>It hits me again!

After update of my Neon I received Plasma 5.19. Same symptoms.

Workarounds:

1) Use of previously backed up wallet can fix the thing.

2) Otherwise you can use the steps in my previous comment, you just need to find the system &quot;affected&quot; by the bug, to be able export your wallet to XML.


Feedback to your teams:

How hard would be to provide corrupted data migration (e.g. test the password for both variants, if it works, convert the wallet). I understand it is not possible when you do not know about the bug, however in this second case the migration should be part of the solution.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1937509</commentid>
    <comment_count>8</comment_count>
    <who name="Shantanu Tushar">shantanu</who>
    <bug_when>2020-06-16 05:29:30 +0000</bug_when>
    <thetext>I hit the same issue when I upgraded Neon User Edition today. I can reproduce the issue in A VM as well:
1. Install Neon from an older ISO (I used neon-user-20190919-1119.iso)
2. Setup kdewallet with one application (chromium in my case)
3. sudo apt full-upgrade
4. kdewallet no longer accepts my password (I had used empty password for this test)

Upgrade log (grep&apos;d to kwallet and upgrade):

2020-06-16 10:17:54 upgrade libkf5wallet-bin:amd64 5.62.0-0xneon+18.04+bionic+build28 5.71.0-0xneon+18.04+bionic+build47
2020-06-16 10:17:55 upgrade libkf5wallet5:amd64 5.62.0-0xneon+18.04+bionic+build28 5.71.0-0xneon+18.04+bionic+build47
2020-06-16 10:17:55 upgrade libkf5wallet-data:all 5.62.0-0xneon+18.04+bionic+build28 5.71.0-0xneon+18.04+bionic+build47
2020-06-16 10:17:57 upgrade libkwalletbackend5-5:amd64 5.62.0-0xneon+18.04+bionic+build28 5.71.0-0xneon+18.04+bionic+build47</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1937545</commentid>
    <comment_count>9</comment_count>
    <who name="Karsten Diem">kdebugs</who>
    <bug_when>2020-06-16 09:05:05 +0000</bug_when>
    <thetext>Hey Chris,

you might be interested in this:
https://bugs.kde.org/show_bug.cgi?id=345412#c47

I also encountered this bug today, so I downgraded all packages related to kwallet.

You might want to check the correct versions you&apos;ve been on before upgrading by issuing this command:


grep &quot; upgrade &quot; /var/log/dpkg.log | grep &quot;wallet&quot;

which, on my system, resulted in:

2020-06-10 11:36:54 upgrade libpam-kwallet5:amd64 4:5.18.5-0xneon+18.04+bionic+build50 4:5.19.0-0xneon+18.04+bionic+build51
2020-06-10 11:36:54 upgrade libpam-kwallet-common:all 4:5.18.5-0xneon+18.04+bionic+build50 4:5.19.0-0xneon+18.04+bionic+build51
2020-06-16 09:20:54 upgrade libkf5wallet-bin:amd64 5.70.0-0xneon+18.04+bionic+build42 5.71.0-0xneon+18.04+bionic+build47
2020-06-16 09:20:54 upgrade libkf5wallet-data:all 5.70.0-0xneon+18.04+bionic+build42 5.71.0-0xneon+18.04+bionic+build47
2020-06-16 09:20:54 upgrade libkf5wallet5:amd64 5.70.0-0xneon+18.04+bionic+build42 5.71.0-0xneon+18.04+bionic+build47
2020-06-16 09:20:55 upgrade libkwalletbackend5-5:amd64 5.70.0-0xneon+18.04+bionic+build42 5.71.0-0xneon+18.04+bionic+build47
2020-06-16 09:21:37 upgrade kwalletmanager:amd64 4:20.04.1-0xneon+18.04+bionic+build34 4:20.04.2-0xneon+18.04+bionic+build37




(In reply to Chris Coetzee from comment #3)
&gt; I&apos;m experiencing the exact same problem after updating Neon tonight. Looks
&gt; like my package versions are the same. 
&gt; 
&gt; I tried downgrading libkwalletbackend5-5, but I couldn&apos;t without breaking
&gt; other packages.
&gt; 
&gt; I didn&apos;t dig deep for the official sources, but I saw this commit on kwaller
&gt; Github project, and it looks like a byte-order change in the encryption may
&gt; have caused this.
&gt; 
&gt; https://github.com/KDE/kwallet/blame/master/src/runtime/kwalletd/backend/
&gt; blowfish.cc
&gt; 
&gt; SOFTWARE/OS VERSIONS
&gt; Operating System: KDE neon Testing Edition
&gt; KDE Plasma Version: 5.18.90
&gt; KDE Frameworks Version: 5.71.0
&gt; Qt Version: 5.14.2
&gt; Kernel Version: 4.15.0-101-generic
&gt; OS Type: 64-bit
&gt; Wallet Manager: Version 20.04.1
&gt; Wallet Backend: Version 5.70.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1937621</commentid>
    <comment_count>10</comment_count>
    <who name="Riccardo Robecchi">sephiroth_pk</who>
    <bug_when>2020-06-16 14:09:55 +0000</bug_when>
    <thetext>Same here. I updated to KDE Frameworks 5.71 this morning and my wallet has been broken since.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1937652</commentid>
    <comment_count>11</comment_count>
    <who name="Shantanu Tushar">shantanu</who>
    <bug_when>2020-06-16 16:12:56 +0000</bug_when>
    <thetext>I can confirm that an upgrade to libkf5wallet5 version 5.71.0-0xneon+18.04+bionic+build49u fixed the problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1937665</commentid>
    <comment_count>12</comment_count>
    <who name="Riccardo Robecchi">sephiroth_pk</who>
    <bug_when>2020-06-16 17:07:37 +0000</bug_when>
    <thetext>(In reply to Shantanu Tushar from comment #11)
&gt; I can confirm that an upgrade to libkf5wallet5 version
&gt; 5.71.0-0xneon+18.04+bionic+build49u fixed the problem.

I confirm that, too. The update arrived a few moments ago and it fixed the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2048874</commentid>
    <comment_count>13</comment_count>
    <who name="popov895">popov895</who>
    <bug_when>2021-07-26 08:02:57 +0000</bug_when>
    <thetext>Looks like this has already been fixed.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>128789</attachid>
            <date>2020-05-25 23:44:35 +0000</date>
            <delta_ts>2020-05-25 23:44:35 +0000</delta_ts>
            <desc>Patch for endianness</desc>
            <filename>0001-Fix-endianness-for-blowfish-and-sha.patch</filename>
            <type>text/plain</type>
            <size>1605</size>
            <attacher name="Chris Coetzee">chriscz93</attacher>
            
              <data encoding="base64">RnJvbSBmNmY5MjYwM2MyMGJlMjg3OTJlOTQ0NGQ2NDM2NjAzZjRkZGM4NDU1IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBDaHJpcyBD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