<table><tr><td style="">aacid created this revision.<br />Restricted Application added a project: Plasma.<br />Restricted Application added a subscriber: plasma-devel.<br />aacid requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D12937">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>As found by Matthias Gerstner the user here controls nearly everything:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">he controls his own password</li>
<li class="remarkup-list-item">he controls where the salt is read from</li>
<li class="remarkup-list-item">he can read the final salted hash (e.g. by calling strace() on kwalletd at the right time)</li>
</ul>

<p>By using this fact he can do the following things:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">test for existence of files in locations otherwise not accessible</li>
<li class="remarkup-list-item">exploit an information leak. 56 bytes of root owned files will be provided to him in the form of a salted hash. He won't be able to easily retrieve the original "salt" again. But if the "salt" comes from a well structured input file then the possible input combinations can suddenly be quite limited and a brute force attack can be feasible to gain knowledge of certain root-owned data.</li>
<li class="remarkup-list-item">the fact that the user can cause a root-owned process to read 56 bytes from an arbitrary file in the system could have other side effects depending on the situation in the system. E.g. FUSE, pseudo file systems or device files might react specially to this.</li>
</ul>

<p>This is a very theoretical attack, but since it's reasonable easy to fix it, let's do it :)</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>kwallet-pam still works</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R107 KWallet PAM Integration</div></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D12937">https://phabricator.kde.org/D12937</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>pam_kwallet.c</div></div></div><br /><div><strong>To: </strong>aacid<br /><strong>Cc: </strong>plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>