Commit Graph

4713 Commits

Author SHA1 Message Date
Lennart Poettering 43e7dd70bc
Merge pull request #17344 from keszybz/bus-connect-more-logs
Add some debug logs to help diagnose bus connections
2020-10-19 17:39:37 +02:00
Harald Seiler ab763cb2be dissect-image: support "uninitialized" machine-id
If the first boot was aborted, /etc/machine-id might read as
"uninitialized" in some cases.  Add a separate case for this
instead of printing a confusing error message.
2020-10-19 16:28:22 +02:00
Zbigniew Jędrzejewski-Szmek 297fc20dc4 shared/daemon-util: fix notify_on_cleanup()
p itself is never null. Because of this, we would always
call sd_notify() in cleanup, even though the intention was to only
call it if notify_start() was executed.
2020-10-19 15:23:37 +02:00
Lennart Poettering dfc22cb472 bootspec: tweak error message
Clarify that the name of the entry failed validation, not the entry
itself.
2020-10-19 14:22:25 +02:00
Zbigniew Jędrzejewski-Szmek 69c0807432
Merge pull request #15206 from anitazha/systoomd-v0
systemd-oomd
2020-10-15 14:16:52 +02:00
Lennart Poettering b8f736b30e pager: lets check SYSTEMD_PAGERSECURE with secure_getenv()
I can't think of any real vulnerability about this, but it still feels
better to check a variable with "secure" in its name with
secure_getenv() rather than plain getenv().

Paranoia FTW!
2020-10-15 10:54:53 +02:00
Lennart Poettering 84fc961082
Merge pull request #17270 from keszybz/less-secure-mode
Use less in "secure" mode when under sudo
2020-10-14 18:33:10 +02:00
Zbigniew Jędrzejewski-Szmek ab4a88eb92 sd-bus: add custom return code when $XDG_RUNTIME_DIR is not set
We would return ENOENT, which is extremely confusing. Strace is not helpful because
no *file* is actually missing. So let's add some logs at debug level and also use
a custom return code. Let all user-facing utilities print a custom error message
in that case.
2020-10-14 18:28:30 +02:00
Lennart Poettering fc8bc57f6b
Merge pull request #16968 from yuwata/remove-old-device-on-move-event
core, udev: remove old device on move event
2020-10-14 17:49:37 +02:00
Lennart Poettering 6ea0d25c57 seccomp: allowlist close_range() by default in @basic-io 2020-10-14 10:40:06 +02:00
Zbigniew Jędrzejewski-Szmek 0a42426d79 pager: make pager secure when under euid is changed or explicitly requested
The variable is renamed to SYSTEMD_PAGERSECURE (because it's not just about
less now), and we automatically enable secure mode in certain cases, but not
otherwise.

This approach is more nuanced, but should provide a better experience for
users:

- Previusly we would set LESSSECURE=1 and trust the pager to make use of
  it. But this has an effect only on less. We need to not start pagers which
  are insecure when in secure mode. In particular more is like that and is a
  very popular pager.

- We don't enable secure mode always, which means that those other pagers can
  reasonably used.

- We do the right thing by default, but the user has ultimate control by
  setting SYSTEMD_PAGERSECURE.

Fixes #5666.

v2:
- also check $PKEXEC_UID

v3:
- use 'sd_pid_get_owner_uid() != geteuid()' as the condition
2020-10-14 10:04:12 +02:00
Lennart Poettering 656f7f8aa5
Merge pull request #17273 from mrc0mmand/coccinelle-check-for-bad-errno
coccinelle: resolve our own macros to avoid skipping functions
2020-10-12 11:39:25 +02:00
Zbigniew Jędrzejewski-Szmek 092f5d2ed3
Merge pull request #17292 from poettering/idn-dlsym
turn libidn/libidn2 dep into dlopen() one
2020-10-10 16:25:49 +02:00
Lennart Poettering 4917e7c727 shared: make libidn/libdidn2 dependency a dlopen() one 2020-10-09 15:47:09 +02:00
Frantisek Sumsal d46b79bbe0 tree-wide: drop if braces around single line expressions as well 2020-10-09 15:11:55 +02:00
Frantisek Sumsal d7a0f1f4f9 tree-wide: assorted coccinelle fixes 2020-10-09 15:02:23 +02:00
Lennart Poettering e13d96ca2c udev-util: ignore remove events, we care about initialization after all 2020-10-09 13:22:25 +02:00
Lennart Poettering e7bcecf0e4
Merge pull request #17279 from poettering/systemctl-split-up
systemctl: split huge .c file into smaller bits
2020-10-08 10:17:29 +02:00
Anita Zhang 9de5e32136 systemd-oomd: manager/daemon 2020-10-07 17:12:24 -07:00
Anita Zhang 61ff7397d0 systemd-oomd: unit testable helper functions
Helpers used by the systemd-oomd daemon to read/fill in various contexts and
make detection and kill decisions.

i.e. a simplified/less configurable version of
https://github.com/facebookincubator/oomd/tree/master/src/oomd.
2020-10-07 17:12:22 -07:00
Anita Zhang 42b83e8e33 shared: helpers to read pressure stats from cgroups 2020-10-07 16:17:24 -07:00
Anita Zhang e30bbc90c9 core: add varlink call to get cgroup paths of units using ManagedOOM*= 2020-10-07 16:17:23 -07:00
Anita Zhang e8e9227f5c varlink: add server write states to disconnect check
While a server is in the VARLINK_PENDING_METHOD or VARLINK_PENDING_METHOD_MORE
states and its write end is disconnected and it gets a POLLHUP, we
should disconnect since it can't write anymore.

In the case of systemd-oomd disconnecting while pid1 was pending-more, this
condition left pid1 in a state where it started throttling from
continually getting POLLHUP.
2020-10-07 16:17:23 -07:00
Anita Zhang 4d824a4e0b core: add ManagedOOM*= properties to configure systemd-oomd on the unit
This adds the hook ups so it can be read with the usual systemd
utilities. Used in later commits by sytemd-oomd.
2020-10-07 16:17:23 -07:00
Lennart Poettering 4dcc0653b5 systemctl: move compare_unit_info() to bus-unit-util.[ch]
It's an auxiliary function to the UnitInfo structures, and very generic.
Let's hence move it over to the other code operating with UnitInfo, even
if it's not used by code outside of systemctl (yet).
2020-10-07 22:19:37 +02:00
Lennart Poettering e2d839d316 pretty-print: don't abbreviate needlessly in user-facing string 2020-10-07 22:19:33 +02:00
Yu Watanabe bff94a84c2 util: make local_gateways() support RT_VIA and RT_MULTIPATH
Then, `networkctl status` correctly shows gateways.
2020-10-08 02:51:23 +09:00
Lennart Poettering bac0bfc1d0 udev-util: make use of sd-event's NULL callback support 2020-10-07 09:40:12 +02:00
Lennart Poettering 612ebf6c91 pager: set $LESSSECURE whenver we invoke a pager
Some extra safety when invoked via "sudo". With this we address a
genuine design flaw of sudo, and we shouldn't need to deal with this.
But it's still a good idea to disable this surface given how exotic it
is.

Prompted by #5666
2020-10-07 09:23:07 +02:00
Zbigniew Jędrzejewski-Szmek 12bab3579f
Merge pull request #17230 from mrc0mmand/coccinelle_fixes
coccinelle: fix the incorrect transformation/isomorphisms
2020-10-05 08:03:40 +02:00
Daan De Meyer 8e4a44c585
Merge pull request #17239 from ferivoz/typos
Fix typos
2020-10-04 18:19:26 +01:00
Frantisek Sumsal 1d6cc5d0e5 tree-wide: coccinelle fixes 2020-10-04 12:32:21 +02:00
Samanta Navarro 7b121df640 seccomp-util: fix typo in help message 2020-10-03 11:56:40 +00:00
Lennart Poettering 781fa474d8 ptyfwd: reopen stdin/sdout before setting O_NONBLOCK
If we set O_NONBLOCK on stdin/stdout directly this means the flag is
left set when we abort abnormally, as we don't get the chance to reset
it again on exit. This might confuse progrms invoking us. Moreover, if
programs invoking us continue to write to the stdout passed to us, they
might be confused by non-blocking mode too.

Hence, let's avoid this if possible: let's reopen stdin/stdout and set
O_NONBLOCK only on the reopend fds, leaving the original fds as they
are.

Prompted-by: https://github.com/systemd/systemd/pull/17070#issuecomment-702304802
2020-10-02 12:04:20 +02:00
Lennart Poettering c14ebe07a9
Merge pull request #17172 from keszybz/read-login-defs
Read /etc/login.defs
2020-10-02 11:01:30 +02:00
Zbigniew Jędrzejewski-Szmek aa25270cb2 sysusers: look at login.defs when setting the default range to allocate users
Also, even if login.defs are not present, don't start allocating at 1, but at
SYSTEM_UID_MIN.

Fixes #9769.

The test is adjusted. Actually, it was busted before, because sysusers would
never use SYSTEM_GID_MIN, so if SYSTEM_GID_MIN was different than
SYSTEM_UID_MIN, the tests would fail. On all "normal" systems the two are
equal, so we didn't notice. Since sysusers now always uses the minimum of the
two, we only need to substitute one value.
2020-10-01 19:53:45 +02:00
Zbigniew Jędrzejewski-Szmek 196b596867 shared/uid-range: reduce scope of iterator variables 2020-10-01 17:52:50 +02:00
Zbigniew Jędrzejewski-Szmek fc1a5d1a70 Also parse the minimum uid/gid values
We don't (and shouldn't I think) look at them when determining the type of the
user, but they should be used during user/group allocation. (For example, an
admin may specify SYS_UID_MIN==200 to allow statically numbered users that are
shared with other systems in the range 1–199.)
2020-10-01 17:52:41 +02:00
Zbigniew Jędrzejewski-Szmek 53393c894d Look at /etc/login.defs for the system_max_[ug]id values
It makes little sense to make the boundary between systemd and user guids
configurable. Nevertheless, a completely fixed compile-time define is not
enough in two scenarios:
- the systemd_uid_max boundary has moved over time. The default used to be
  500 for a long time. Systems which are upgraded over time might have users
  in the wrong range, but changing existing systems is complicated and
  expensive (offline disks, backups, remote systems, read-only media, etc.)
- systems are used in a heterogenous enviornment, where some vendors pick
  one value and others another.
So let's make this boundary overridable using /etc/login.defs.

Fixes #3855, #10184.
2020-10-01 17:49:31 +02:00
Franck Bui 8ce3de991b
Merge pull request #17214 from poettering/log-generator-fix
fix logging in generators
2020-10-01 10:51:19 +02:00
Lennart Poettering fabf877705
Merge pull request #17154 from keszybz/crypttab-commas
Allow escaping commas in crypttab
2020-10-01 10:26:24 +02:00
Lennart Poettering 7ea3024b50 bootspec: don't fail with EIO if searching for ESP and finding one without an enveloping partition table
If this happens this should just mean: we couldn't find the ESP.

Fixes: #17122
2020-10-01 10:21:02 +02:00
Lennart Poettering dee29aeb59 generator: use kmsg in system-level generators, journal otherwise
Fixes: #17129.
2020-09-30 16:28:34 +02:00
Lennart Poettering 8e24b1d23f seccomp-util: add cacheflush() syscall to @default syscall set
This is like membarrier() I guess and basically just exposes CPU
functionality via kernel syscall on some archs. Let's whitelist it for
everyone.

Fixes: #17197
2020-09-30 10:08:15 +02:00
Lennart Poettering a182fa895b
Merge pull request #17194 from poettering/dot-suffix
resolved: turn off search domain logic for queries for dot-suffixed domains
2020-09-29 15:50:06 +02:00
Lennart Poettering 64c82c25ab dns-domain: add helper that checks whether domain is dot suffixed 2020-09-29 12:09:16 +02:00
Lennart Poettering b9daaedbb9 udev-util: simplify device_is_renaming() error handling 2020-09-28 18:45:54 +02:00
Yu Watanabe fe2aeef816 ethtool: add several new link modes 2020-09-28 22:49:33 +09:00
Yu Watanabe 41f4269619 ethtool: convert underscore to hyphen 2020-09-28 22:44:05 +09:00
Yu Watanabe 7207d82c13 shared/linux: update ethtool.h 2020-09-28 22:42:44 +09:00
Luca Boccassi feee7f6288 libcrypt-util: use build-time check for crypt_preferred_method
After https://github.com/systemd/systemd/pull/16981 only the presence of crypt_gensalt_ra
is checked, but there are cases where that function is available but crypt_preferred_method
is not, and they are used in the same ifdef.
Add a check for the latter as well.
2020-09-28 10:23:48 +02:00
Lennart Poettering 3b493d94ae mount-util: show mount source in mount_verbose_full() debug output 2020-09-25 17:55:39 +02:00
Zbigniew Jędrzejewski-Szmek 98dcb8f4c7 Move {uid,gid}_is_*() from basic to shared
Those are functions that express policy, and nothing in basic/ uses
(or should use) them.
2020-09-25 17:18:56 +02:00
Lennart Poettering 77ad674b51 loop-util: apparently opening a loop device sometimes results in ENXIO, handle this 2020-09-25 16:03:05 +02:00
Lennart Poettering 0950526afd loop-util: use right flags field 2020-09-25 16:02:56 +02:00
Zbigniew Jędrzejewski-Szmek 7bb553bb98 fstab,crypttab: allow escaping of commas
Fixes #17035. We use "," as the separator between arguments in fstab and crypttab
options field, but the kernel started using "," within arguments. Users will need
to escape those nested commas.
2020-09-25 13:36:34 +02:00
Zbigniew Jędrzejewski-Szmek fe79f107ef tree-wide: drop assignments to r when we only need errno
If the whole call is simple and we don't need to look at the return value
apart from the conditional, let's use a form without assignment of the return
value. When the function call is more complicated, it still makes sense to
use a temporary variable.
2020-09-24 16:36:43 +02:00
Lennart Poettering bcaf20dc38
Merge pull request #17143 from keszybz/late-exec-resolution-alt
Late exec resolution (subset)
2020-09-24 09:38:36 +02:00
Lennart Poettering 30f5d10421 mount-util: rework umount_verbose() to take log level and flags arg
Let's make umount_verbose() more like mount_verbose_xyz(), i.e. take log
level and flags param. In particular the latter matters, since we
typically don't actually want to follow symlinks when unmounting.
2020-09-23 18:57:36 +02:00
Lennart Poettering 511a8cfe30 mount-util: switch most mount_verbose() code over to not follow symlinks 2020-09-23 18:57:36 +02:00
Lennart Poettering 5012d567a8 mount-util: make sure get_mount_flags() ever follows symlinks
It doesn't follow symlinks when we check for the mount flags via
libmount, hence it shouldn't do either when we go via statvfs().
2020-09-23 18:57:36 +02:00
Lennart Poettering 28126409b2 mount-util: add helpers for mount() without following symlinks 2020-09-23 18:57:36 +02:00
Lennart Poettering 6b6737119a
Merge pull request #17130 from keszybz/static-analyzer-cleanups
Trivial cleanups based on static analysis
2020-09-23 13:23:56 +02:00
Lennart Poettering 2d52f8c46c
Merge pull request #17124 from bluca/copypasta
dissect-image: use correct path variable when reading verity signatures, do not refuse verity GPT without /usr partition
2020-09-23 09:43:39 +02:00
Lennart Poettering 3cbf74652b
Merge pull request #17127 from poettering/errno-fixup
make more use of errno-util.h macros
2020-09-23 09:43:18 +02:00
Zbigniew Jędrzejewski-Szmek fec5929f8b shared/conf-parser: drop redundant cast to boolean
parse_boolean returns either 0 or 1 or error, and we checked for errors
earlier already.
2020-09-22 18:00:44 +02:00
Lennart Poettering fce93d7aa3 ptyfwd: use ERRNO_IS_DISCONNECT() when checking for disconnection on foreign fds 2020-09-22 16:25:22 +02:00
Lennart Poettering 065b47749d tree-wide: use ERRNO_IS_PRIVILEGE() whereever appropriate 2020-09-22 16:25:22 +02:00
Luca Boccassi c848516f3f dissect-image: do not refuse verity GPT without /usr partition
Only enforce that /usr verity partition is present if a /usr
partition is there
2020-09-22 15:24:59 +01:00
Luca Boccassi 7025fa8b1a dissect-image: use correct path variable when reading verity signatures
Copypasta slipped in via https://github.com/systemd/systemd/pull/17101
2020-09-22 13:19:19 +01:00
Lennart Poettering 3e0b54867e user-record: don't refuse login when last pw change time is in the future
The RTC is like just off, it's a weird system state, let's continue
without requiring pw change.
2020-09-21 18:02:35 +02:00
Lennart Poettering 61a29a020c homed: ignore ratelimiting counters when timestamp is from future
This likely indicates that the system clock is simply wrong, hence allow
access in this case.

Fixes: #15917
2020-09-21 18:02:35 +02:00
Lennart Poettering 51a95db6dc homed: don't block logins into accounts with future change time
This might happen if the system clock is wrong, and we should allow
access in this case (though certainly log about it).
2020-09-21 18:02:31 +02:00
Lennart Poettering aee36b4ea2 dissect-image: process /usr/ GPT partition type 2020-09-19 21:19:51 +02:00
Lennart Poettering 2bc181dae7 gpt: add new GPT partition types of /usr partitions 2020-09-19 21:19:23 +02:00
Lennart Poettering 3f440b13b7
Merge pull request #16981 from keszybz/use-crypt_ra
Use crypt_ra to allocate scratch area for password hashing
2020-09-18 19:46:08 +02:00
Zbigniew Jędrzejewski-Szmek f7bc0c324a Rename find_binary to find_executable
"executable" is more correct than "binary", since scripts are OK too.
2020-09-18 15:28:48 +02:00
Lennart Poettering 9434438543 dissect: use structured initialization, it's prettier 2020-09-17 18:02:45 +02:00
Lennart Poettering 3afda7c797 dissect: is_loop_device() returns negative on error, don't mistake that is true 2020-09-17 18:02:41 +02:00
Lennart Poettering 74cb2db9f4 dissect: always invalidate secondary arch partitions if we found primary arch
Let's suppress the secondary arch data, since we never ever want to
mount it if we found the primary arch.

Previously we only suppressed in the Verity case, but there's little
reason to entertain the idea of a secondary arch in non-Verity
environments either, we are not going to use them, and should not do
decryption or anything like that.
2020-09-17 18:02:37 +02:00
Lennart Poettering 220431724b dissect: three trivial fixes
Uppercase first char of log message, and indicate correct program name.

Reindent comment table at one place.

Use correct, specific, enum type at one more place.
2020-09-17 18:02:33 +02:00
Lennart Poettering 89e62e0bd3 dissect: wrap verity settings in new VeritySettings structure
Just some refactoring: let's place the various verity related parameters
in a common structure, and pass that around instead of the individual
parameters.

Also, let's load the PKCS#7 signature data when finding metadata
right-away, instead of delaying this until we need it. In all cases we
call this there's not much time difference between the metdata finding
and the loading, hence this simplifies things and makes sure root hash
data and its signature is now always acquired together.
2020-09-17 20:36:23 +09:00
Lennart Poettering eb5e26112e
Merge pull request #17076 from poettering/dissect-cleanup
minor cleanups to the dissector code
2020-09-16 18:42:12 +02:00
Lennart Poettering c796b91d2b
Merge pull request #16675 from topimiettinen/exec-syscall-error-action
SystemCallFilter, SystemCallErrorAction error actions kill and log
2020-09-16 17:01:44 +02:00
Lennart Poettering aa088f62d1 gpt: move GPT_LINUX_GENERIC definition next to the user GPT partition types
No code changes, just some reordering.
2020-09-16 16:31:16 +02:00
Lennart Poettering 569a0e42ec dissect: introduce PartitionDesignator as real type 2020-09-16 16:14:01 +02:00
Lennart Poettering f5215bc8d3 dissect: rename mount_options_from_part() → mount_options_from_designator()
After all, it actually takes a designator argument, not a partition
index or so.
2020-09-15 22:23:22 +02:00
Lennart Poettering b7b7ace4ea tests: try to allocate a delegated scope unit for our cgroup tests
Prompted-by: #16632
2020-09-15 13:32:15 +02:00
Topi Miettinen 9df2cdd8ec exec: SystemCallLog= directive
With new directive SystemCallLog= it's possible to list system calls to be
logged. This can be used for auditing or temporarily when constructing system
call filters.

---
v5: drop intermediary, update HASHMAP_FOREACH_KEY() use
v4: skip useless debug messages, actually parse directive
v3: don't declare unused variables with old libseccomp
v2: fix build without seccomp or old libseccomp
2020-09-15 12:54:17 +03:00
Topi Miettinen 005bfaf118 exec: Add kill action to system call filters
Define explicit action "kill" for SystemCallErrorNumber=.

In addition to errno code, allow specifying "kill" as action for
SystemCallFilter=.

---
v7: seccomp_parse_errno_or_action() returns -EINVAL if !HAVE_SECCOMP
v6: use streq_ptr(), let errno_to_name() handle bad values, kill processes,
 init syscall_errno
v5: actually use seccomp_errno_or_action_to_string(), don't fail bus unit
parsing without seccomp
v4: fix build without seccomp
v3: drop log action
v2: action -> number
2020-09-15 12:54:17 +03:00
Zbigniew Jędrzejewski-Szmek 35e22827a9 shared/libcrypt-util: do not refuse passwords if some other hash is unsupported 2020-09-15 11:52:30 +02:00
Zbigniew Jędrzejewski-Szmek 9de324c3c9 shared/libcrypt-util: add fallback for crypt_ra()
Following the style in missing_syscall.h, we use a non-conflicting name
for the function and use a macro to map to the real name to the replacement.
2020-09-15 11:52:30 +02:00
Zbigniew Jędrzejewski-Szmek 2b49f0ca83 Check for crypt_gensalt_ra() instead of relying on libxcrypt presence
Since the loop to check various xcrypt functions is already in place,
adding one more is cheap. And it is nicer to check for the function
directly. People like to backport things, so we might get lucky even
without having libxcrypt.
2020-09-15 11:52:30 +02:00
Zbigniew Jędrzejewski-Szmek 83764f8d00 shared/libcrypt-util: include fewer headers
Now that we wrap crypt_r/ra uses, we can include the header only in libcrypt-util.c.
2020-09-15 11:52:30 +02:00
Zbigniew Jędrzejewski-Szmek 999b49c818 Make test_password_{one,many} also use crypt_ra() 2020-09-15 11:52:30 +02:00
Zbigniew Jędrzejewski-Szmek 2ae297fe0d Move test_password_{one,many} to libcrypt-util.c
They are only used under src/home/, but I want to add tests in test-libcrypt-util.c.
And the functions are almost trivial, so I think it is OK to move them to shared.
2020-09-15 11:52:30 +02:00
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
Zbigniew Jędrzejewski-Szmek 0e98d17e77 Add a helper function that does make_salt+crypt_r
No functional change.
2020-09-15 09:30:56 +02:00
Yu Watanabe cadc7ed2e2 ethtool: constify arguments for ethtool_set_xxx() 2020-09-15 11:06:25 +09:00
Frantisek Sumsal 05827831a6 shared: drop a redundant if statement 2020-09-14 16:18:18 +02:00