mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
shared/conf-parser: fix crash when specifiers cannot be resolved in config_parse_device_allow()
oss-fuzz #6885.
This commit is contained in:
parent
0d032da993
commit
20d52ab60e
1
TODO
1
TODO
@ -528,6 +528,7 @@ Features:
|
||||
* maybe add a generator that looks for "systemd.run=" on the kernel cmdline for container usercases...
|
||||
|
||||
* test/:
|
||||
- add unit tests for config_parse_device_allow()
|
||||
|
||||
* seems that when we follow symlinks to units we prefer the symlink
|
||||
destination path over /etc and /usr. We should not do that. Instead
|
||||
|
@ -410,7 +410,6 @@ int config_parse_socket_listen(const char *unit,
|
||||
if (r < 0) {
|
||||
if (r != -EAFNOSUPPORT)
|
||||
log_syntax(unit, LOG_ERR, filename, line, r, "Failed to parse address value, ignoring: %s", rvalue);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -3511,6 +3510,7 @@ int config_parse_device_allow(
|
||||
log_syntax(unit, LOG_WARNING, filename, line, r,
|
||||
"Failed to resolve specifiers in %s, ignoring: %m",
|
||||
rvalue);
|
||||
return 0;
|
||||
}
|
||||
|
||||
n = strcspn(t, WHITESPACE);
|
||||
|
3
test/fuzz-regressions/fuzz-unit-file/oss-fuzz-6885
Normal file
3
test/fuzz-regressions/fuzz-unit-file/oss-fuzz-6885
Normal file
@ -0,0 +1,3 @@
|
||||
service
|
||||
[Service]
|
||||
DeviceAllow=%D
|
@ -30,4 +30,5 @@ fuzz_regression_tests = '''
|
||||
fuzz-dns-packet/oss-fuzz-5465
|
||||
fuzz-dns-packet/issue-7888
|
||||
fuzz-unit-file/oss-fuzz-6884
|
||||
fuzz-unit-file/oss-fuzz-6885
|
||||
'''.split()
|
||||
|
Loading…
Reference in New Issue
Block a user