CVE-2019-9213 - NULL Pointer Dereference

Severity

49%

Complexity

39%

Confidentiality

115%

In the Linux kernel before 4.20.14, expand_downwards in mm/mmap.c lacks a check for the mmap minimum address, which makes it easier for attackers to exploit kernel NULL pointer dereferences on non-SMAP platforms. This is related to a capability check for the wrong task.

In the Linux kernel before 4.20.14, expand_downwards in mm/mmap.c lacks a check for the mmap minimum address, which makes it easier for attackers to exploit kernel NULL pointer dereferences on non-SMAP platforms. This is related to a capability check for the wrong task.

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

CVSS 2.0 Base Score 4.9. CVSS Attack Vector: local. CVSS Attack Complexity: low. CVSS Vector: (AV:L/AC:L/Au:N/C:N/I:N/A:C).

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

First reported 5 years ago

2019-03-05 22:29:00

Last updated 5 years ago

2019-06-17 21:15:00

Affected Software

Linux Kernel

Debian Linux 8.0 (Jessie)

8.0

Red Hat Enterprise Linux (RHEL) 7.0 (7)

7.0

openSUSE Leap 15.0

15.0

openSUSE Leap 42.3

42.3

Canonical Ubuntu Linux 12.04 ESM (Extended Security Maintenance)

12.04

Canonical Ubuntu Linux 14.04 LTS (Long-Term Support)

14.04

Canonical Ubuntu Linux 16.04 LTS (Long-Term Support)

16.04

Canonical Ubuntu Linux 18.04 LTS Edition

18.04

Canonical Ubuntu Linux 18.10

18.10

References

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=0a1d52994d440e21def1c2174932410b4f2a98a1

Patch, Vendor Advisory

openSUSE-SU-2019:1085

Mailing List, Third Party Advisory

openSUSE-SU-2019:1193

Mailing List, Third Party Advisory

http://packetstormsecurity.com/files/156053/Reliable-Datagram-Sockets-RDS-rds_atomic_free_op-Privilege-Escalation.html

107296

Third Party Advisory, VDB Entry

RHSA-2019:0831

Third Party Advisory

RHSA-2019:1479

RHSA-2019:1480

https://bugs.chromium.org/p/project-zero/issues/detail?id=1792

Exploit, Mailing List, Third Party Advisory

https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.14.105

Mailing List, Patch, Vendor Advisory

https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.27

Mailing List, Patch, Vendor Advisory

https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.14

Mailing List, Patch, Vendor Advisory

https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.162

Mailing List, Patch, Vendor Advisory

https://github.com/torvalds/linux/commit/0a1d52994d440e21def1c2174932410b4f2a98a1

Mailing List, Patch, Vendor Advisory

[debian-lts-announce] 20190327 [SECURITY] [DLA 1731-1] linux security update

Mailing List, Third Party Advisory

[debian-lts-announce] 20190401 [SECURITY] [DLA 1731-2] linux regression update

Mailing List, Third Party Advisory

[debian-lts-announce] 20190503 [SECURITY] [DLA 1771-1] linux-4.9 security update

Mailing List, Third Party Advisory

USN-3930-1

Third Party Advisory

USN-3930-2

Third Party Advisory

USN-3931-1

Third Party Advisory

USN-3931-2

Third Party Advisory

USN-3932-1

Third Party Advisory

USN-3932-2

Third Party Advisory

USN-3933-1

Third Party Advisory

USN-3933-2

Third Party Advisory

46502

Exploit, Third Party Advisory, VDB Entry

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.