mirror of
https://github.com/systemd/systemd.git
synced 2026-08-04 15:10:33 +00:00
Merge pull request #15889 from evverx/15885
network: Fix crash when SendOption= is invalid
This commit is contained in:
@@ -499,7 +499,7 @@ int config_parse_dhcp_send_option(
|
||||
r = extract_first_word(&p, &word, ":", 0);
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r <= 0) {
|
||||
if (r <= 0 || isempty(p)) {
|
||||
log_syntax(unit, LOG_ERR, filename, line, r,
|
||||
"Invalid DHCP option, ignoring assignment: %s", rvalue);
|
||||
return 0;
|
||||
|
||||
9
test/fuzz/fuzz-network-parser/github-15885
Normal file
9
test/fuzz/fuzz-network-parser/github-15885
Normal file
@@ -0,0 +1,9 @@
|
||||
[DHCPv4]
|
||||
SendOption=1:string:
|
||||
SendOption=1:uint8:
|
||||
SendOption=1:uint16:
|
||||
SendOption=1:uint32:
|
||||
SendOption=1:ipv4address:
|
||||
SendOption=1:ipv4address:127.0.0.1
|
||||
SendOption=1:ipv6address:
|
||||
SendOption=1:ipv6address:52:54:00:b9:b5:61
|
||||
Reference in New Issue
Block a user