Kotlin

Kotlin : Null dereference on some path

Classification

CWE/SANS Top 25 2021

Overview

A null pointer dereference on some path takes place when there is a flow in control flow graph of the program that guarantees that a null pointer is used as if it were pointing to a valid, non-null memory area. As a result, a NullPointerException is thrown.

Null pointer errors are usually the result of programmer assumptions violation. Most null pointer issues result in general software reliability problems, but if an attacker can intentionally trigger a null pointer dereference, he might be able to use the resulting exception to bypass security logic or gain access to the app debugging information.

Null pointer dereferences, while common, can generally be found and corrected in a simple way. Usually they will always result in the crash of the process.

MEDIUM

DerScanner Severity Score

Check your Kotlin code for this vulnerability, free

Request a free pilot of DerScanner. We give you access and help with the first scan. It works in the cloud and on-premise.

Try it on your code, free

By submitting this form, I acknowledge that DerScanner may process my personal data I provided above for purposes explained above. More details about the processing.