The Wayback Machine - https://web.archive.org/web/20260106040325/https://github.com/github/codeql/issues/4591
Skip to content

Java: TaintTrackingUtil.qll ObjectInputStream.read% taint is faulty #4591

@Marcono1234

Description

@Marcono1234

TraintTrackingUtil.qll currently models that all ObjectInputStream read% methods preserve tainted data:

m.getDeclaringType().hasQualifiedName("java.io", "ObjectInputStream") and
m.getName().matches("read%")

As pointed out in #4582 (comment), this logic is likely faulty because read(byte[], int, int) returns the number of read bytes which therefore should not represent tainted data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions