1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 10:51:20 +03:00
The systemd System and Service Manager
Go to file
Zbigniew Jędrzejewski-Szmek a937ce2d85 shared/libcrypt-util: use libcrypt_ra()
This lets the libc/xcrypt allocate as much storage area as it needs.
Should fix #16965:

testsuite-46.sh[74]: ==74==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7f3e972e1080 at pc 0x7f3e9be8deed bp 0x7ffce4f28530 sp 0x7ffce4f27ce0
testsuite-46.sh[74]: WRITE of size 131232 at 0x7f3e972e1080 thread T0
testsuite-46.sh[74]:     #0 0x7f3e9be8deec  (/usr/lib/clang/10.0.1/lib/linux/libclang_rt.asan-x86_64.so+0x9feec)
testsuite-46.sh[74]:     #1 0x559cd05a6412 in user_record_make_hashed_password /systemd-meson-build/../build/src/home/user-record-util.c:818:21
testsuite-46.sh[74]:     #2 0x559cd058fb03 in create_home /systemd-meson-build/../build/src/home/homectl.c:1112:29
testsuite-46.sh[74]:     #3 0x7f3e9b5b3058 in dispatch_verb /systemd-meson-build/../build/src/shared/verbs.c:103:24
testsuite-46.sh[74]:     #4 0x559cd058c101 in run /systemd-meson-build/../build/src/home/homectl.c:3325:16
testsuite-46.sh[74]:     #5 0x559cd058c00a in main /systemd-meson-build/../build/src/home/homectl.c:3328:1
testsuite-46.sh[74]:     #6 0x7f3e9a88b151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
testsuite-46.sh[74]:     #7 0x559cd0583e7d in _start (/usr/bin/homectl+0x24e7d)
testsuite-46.sh[74]: Address 0x7f3e972e1080 is located in stack of thread T0 at offset 32896 in frame
testsuite-46.sh[74]:     #0 0x559cd05a60df in user_record_make_hashed_password /systemd-meson-build/../build/src/home/user-record-util.c:789
testsuite-46.sh[74]:   This frame has 6 object(s):
testsuite-46.sh[74]:     [32, 40) 'priv' (line 790)
testsuite-46.sh[74]:     [64, 72) 'np' (line 791)
testsuite-46.sh[74]:     [96, 104) 'salt' (line 809)
testsuite-46.sh[74]:     [128, 32896) 'cd' (line 810)
testsuite-46.sh[74]:     [33152, 33168) '.compoundliteral' <== Memory access at offset 32896 partially underflows this variable
testsuite-46.sh[74]:     [33184, 33192) 'new_array' (line 832) <== Memory access at offset 32896 partially underflows this variable
testsuite-46.sh[74]: HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
testsuite-46.sh[74]:       (longjmp and C++ exceptions *are* supported)
testsuite-46.sh[74]: SUMMARY: AddressSanitizer: stack-buffer-overflow (/usr/lib/clang/10.0.1/lib/linux/libclang_rt.asan-x86_64.so+0x9feec)

It seems 'struct crypt_data' is 32896 bytes, but libclang_rt wants more, at least 33168?
2020-09-15 09:30:56 +02:00
.github
.lgtm/cpp-queries
.mkosi
catalog
coccinelle
docs socket: New option 'FlushPending' (boolean) to flush socket before entering listening state 2020-09-01 17:20:23 +02:00
factory/etc
hwdb.d hwdb: Add Adesso AKB-805MAC keyboard, mfd by Ortek 2020-09-03 09:20:17 +02:00
man man: fix typo in resolved.conf 2020-09-05 21:38:01 +02:00
modprobe.d
network
po Translated using Weblate (Croatian) 2020-08-29 13:29:25 +02:00
presets
rules.d
semaphoreci
shell-completion bash-completion: resolvectl: support 'log-level' command 2020-09-04 17:03:28 +09:00
src shared/libcrypt-util: use libcrypt_ra() 2020-09-15 09:30:56 +02:00
sysctl.d
sysusers.d
test Merge pull request #16044 from ssahani/resolved-interface 2020-09-03 19:06:05 +02:00
tmpfiles.d
tools
travis-ci
units Merge pull request #16850 from mbiebl/networkd-socket-activation 2020-08-29 16:12:46 +02:00
xorg
.clang-format
.ctags
.dir-locals.el
.editorconfig
.gitattributes
.gitignore
.lgtm.yml
.mailmap
.travis.yml
.vimrc
.ycm_extra_conf.py
azure-pipelines.yml
configure
LICENSE.GPL2
LICENSE.LGPL2.1
Makefile
meson_options.txt
meson.build shared: make libcryptsetup dep dlopen 2020-09-02 15:04:06 +02:00
mkosi.build
NEWS NEWS: explain the "bind"/"unbind" situation a bit 2020-09-01 17:40:13 +02:00
README
README.md
TODO update TODO 2020-09-02 15:04:06 +02:00
zanata.xml

Systemd

System and Service Manager

Count of open issues over time Count of open pull requests over time Semaphore CI Build Status
Coverity Scan Status
OSS-Fuzz Status
CIFuzz
CII Best Practices
Travis CI Build Status
Language Grade: C/C++
CentOS CI Build Status
Build Status
Fossies codespell report
Packaging status

Details

Most documentation is available on systemd's web site.

Assorted, older, general information about systemd can be found in the systemd Wiki.

Information about build requirements is provided in the README file.

Consult our NEWS file for information about what's new in the most recent systemd versions.

Please see the Hacking guide for information on how to hack on systemd and test your modifications.

Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.

When preparing patches for systemd, please follow our Coding Style Guidelines.

If you are looking for support, please contact our mailing list or join our IRC channel.

Stable branches with backported patches are available in the stable repo.