Bug 1678510 - sddm-helper creates weird directories inside my home directory at each login
Summary: sddm-helper creates weird directories inside my home directory at each login
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: sddm
Version: 29
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Martin Bříza
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-19 00:09 UTC by Andrew Zabolotny
Modified: 2019-04-15 17:43 UTC (History)
8 users (show)

Fixed In Version: sddm-0.18.0-4.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-04-15 17:43:37 UTC
Type: Bug


Attachments (Terms of Use)

Description Andrew Zabolotny 2019-02-19 00:09:25 UTC
Description of problem:
After each login I get a new subdirectory created inside my home directory.
I mean such things:
drwx------.  3 alice alice  4096 фев 19 02:51 'p�'$'\021''�U'/

Inside there's an empty .cache directory and inside .cache there's an empty .xsession-errors.

Version-Release number of selected component (if applicable):
sddm-0.18.0-1.fc29.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Network install Fedora 29 with KDE desktop from USB stick
2. Create a user account
3. Login and look inside ~

Actual results:
There's a just-created directory with random chars in its name.

Additional info:
I enabled audit and tracked the bug down to sddm-helper creating these directories:

type=PROCTITLE msg=audit(19.02.2019 02:51:02.381:251) : proctitle=/usr/libexec/sddm-helper --socket /tmp/sddm-autheeb5bb4c-d6a5-4448-89be-ca0c1883c1e8 --id 1 --start /usr/bin/startkde --user alitype=PATH msg=audit(19.02.2019 02:51:02.381:251) : item=1 name=/home/alice/p�\021�U inode=11272248 dev=fd:03 mode=dir,700 ouid=alice ogid=alice rdev=00:00 obj=system_u:object_r:user_home_t:s0 nametype=CREATE cap_fp=none cap_fi=none cap_fe=0 cap_fver=0
type=PATH msg=audit(19.02.2019 02:51:02.381:251) : item=0 name=/home/alice/ inode=112
72193 dev=fd:03 mode=dir,700 ouid=alice ogid=alice rdev=00:00 obj=unconfined_u:object_r:user_home_dir_t:s0 nametype=PARENT cap_fp=none cap_fi=none cap_fe=0 cap_fver=0
type=CWD msg=audit(19.02.2019 02:51:02.381:251) : cwd=/home/alice
type=SYSCALL msg=audit(19.02.2019 02:51:02.381:251) : arch=x86_64 syscall=mkdir success=yes exit=0 a0=0x55da11a466b8 a1=0777 a2=0x15 a3=0x0 items=2 ppid=1727 pid=1752 auid=alice uid=alice gid=alice euid=alice suid=alice fsuid=alice egid=alice sgid=alice fsgid=alice tty=(none) ses=4 comm=sddm-helper exe=/usr/libexec/sddm-helper subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)

---

There's a very similar bug #1665740 but they blame abrt there. I have erased abrt and his countless minions off the face of my OS and I still get those directories created at (almost) every login. So abrt is not the cause.

Comment 1 Vladislav Solovei 2019-03-01 10:29:20 UTC
Fedora 29 x86_64, updated.
I have the same problem.


type=AVC msg=audit(1551435502.201:259): avc:  denied  { write } for  pid=1800 comm="sddm-helper" path="/home/username/3V/.cache/xsession-errors" dev="dm-1" ino=202884691 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:user_home_t:s0 tclass=file permissive=0

- in this case sddm-helper tries to create *V folder. The first symbol is always different.
On example:
�U
PV
3V

Comment 2 Andrew Zabolotny 2019-03-09 08:23:45 UTC
Looks like the weird name is somehow related to a) login name and b) locale.
As far as I understand both me and Vladislav are using Cyrillic locales.

Comment 3 Vladislav Solovei 2019-03-09 14:26:44 UTC
No, that's not a locale issue.
I'm using en_US.UTF-8.

Occasionally, sddm_helper gets a corrupted passwd structure from getpwnam_r() in function UserSession::setupChildProcess()
Why? I don't know.
Regardless of username, locale, etc...
Different CPUs?

Comment 4 Vladislav Solovei 2019-03-09 16:59:33 UTC
So, i guess, the reason ins line 233 in src/helper/UserSession.cpp:
free(buffer)

C code to demonstrate this behavior https://pastebin.com/fpWyg78c
My output:
before: /home/zend
after: J

Comment 5 Fedora Update System 2019-03-15 20:18:46 UTC
sddm-0.18.0-4.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-96c964d319

Comment 6 Fedora Update System 2019-04-15 17:43:37 UTC
sddm-0.18.0-4.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.