CVE-2022-2928 - NULL Pointer Dereference

Severity

75%

Complexity

39%

Confidentiality

60%

In ISC DHCP 4.4.0 -> 4.4.3, ISC DHCP 4.1-ESV-R1 -> 4.1-ESV-R16-P1, when the function option_code_hash_lookup() is called from add_option(), it increases the option's refcount field. However, there is not a corresponding call to option_dereference() to decrement the refcount field. The function add_option() is only used in server responses to lease query packets. Each lease query response calls this function for several options, so eventually, the reference counters could overflow and cause the server to abort.

CVSS 3.1 Base Score 7.5. CVSS Attack Vector: network. CVSS Attack Complexity: low. CVSS Vector: (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

CVSS 3.1 Base Score 6.5. CVSS Attack Vector: adjacent_network. CVSS Attack Complexity: low. CVSS Vector: (CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Demo Examples

NULL Pointer Dereference

CWE-476

While there are no complete fixes aside from conscientious programming, the following steps will go a long way to ensure that NULL pointer dereferences do not occur.


               
}
/* make use of pointer1 *//* ... */

If you are working with a multithreaded or otherwise asynchronous environment, ensure that proper locking APIs are used to lock before the if statement; and unlock when it has finished.

NULL Pointer Dereference

CWE-476

This example takes an IP address from a user, verifies that it is well formed and then looks up the hostname and copies it into a buffer.


               
}
strcpy(hostname, hp->h_name);/*routine that ensures user_supplied_addr is in the right format for conversion */

If an attacker provides an address that appears to be well-formed, but the address does not resolve to a hostname, then the call to gethostbyaddr() will return NULL. Since the code does not check the return value from gethostbyaddr (CWE-252), a NULL pointer dereference would then occur in the call to strcpy().

Note that this example is also vulnerable to a buffer overflow (see CWE-119).

NULL Pointer Dereference

CWE-476

In the following code, the programmer assumes that the system always has a property named "cmd" defined. If an attacker can control the program's environment so that "cmd" is not defined, the program throws a NULL pointer exception when it attempts to call the trim() method.


               
cmd = cmd.trim();

NULL Pointer Dereference

CWE-476

This application has registered to handle a URL when sent an intent:


               
}......
}
}
int length = URL.length();
...

The application assumes the URL will always be included in the intent. When the URL is not present, the call to getStringExtra() will return null, thus causing a null pointer exception when length() is called.

Overview

Type

ISC DHCP 4.1-ESV

First reported 2 years ago

2022-10-07 05:15:00

Last updated 2 years ago

2022-11-28 18:09:00

Affected Software

ISC DHCP 4.1-ESV Release 12

4.1-esv

ISC DHCP 4.1-ESV Release 11 Release Candidate 1

4.1-esv

ISC DHCP 4.1-ESV Release 11 Beta 1

4.1-esv

ISC DHCP 4.1-ESV Release 10 Beta 1

4.1-esv

ISC DHCP 4.1-ESV Release 10

4.1-esv

ISC DHCP 4.1-ESV Release 12 Beta 1

4.1-esv

ISC DHCP 4.1-ESV Release11 Release Candidate 2

4.1-esv

ISC DHCP 4.1-ESV R1

4.1-esv

ISC DHCP 4.1-ESV R10 Release Candidate 1

4.1-esv

ISC DHCP 4.1-ESV R10 Beta 1

4.1-esv

ISC DHCP 4.1-ESV R10 Release Candidate 1

4.1-esv

ISC DHCP 4.1-ESV R11

4.1-esv

ISC DHCP 4.1-ESV R11 Beta 1

4.1-esv

ISC DHCP 4.1-ESV R11 Release Candidate 1

4.1-esv

ISC DHCP 4.1-ESV R11 Release Candidate 2

4.1-esv

ISC DHCP 4.1-ESV R12 Patch 1

4.1-esv

ISC DHCP 4.1-ESV R12 P1

4.1-esv

ISC DHCP 4.1-ESV R12 Beta 1

4.1-esv

ISC DHCP 4.1-ESV R13

4.1-esv

ISC DHCP 4.1-ESV R13 B1

4.1-esv

ISC DHCP 4.1-ESV R13 Beta 1

4.1-esv

ISC DHCP 4.1-ESV R14

4.1-esv

ISC DHCP 4.1-ESV R14 B1

4.1-esv

ISC DHCP 4.1-ESV R14 Beta 1

4.1-esv

ISC DHCP 4.1-ESV R15

4.1-esv

ISC DHCP 4.1-ESV R15 Patch 1

4.1-esv

ISC DHCP 4.1-ESV R15 B1

4.1-esv

Stay updated

ExploitPedia is constantly evolving. Sign up to receive a notification when we release additional functionality.

Get in touch

If you'd like to report a bug or have any suggestions for improvements then please do get in touch with us using this form. We will get back to you as soon as we can.