8000 OPTRecord.rrFromWire() will read past RDLEN if given the opportunity · Issue #225 · dnsjava/dnsjava · GitHub
[go: up one dir, main page]

Skip to content
OPTRecord.rrFromWire() will read past RDLEN if given the opportunity  #225
Closed
@nresare

Description

@nresare

Parsing an OPTRecord should not read past the end of the record, however due to the current behaviour of the limit functionality in DNSInput, this is currently what happens.

EDNSOption.fromWire() calls the sequence DNSInput.saveActive(), DNSInput.setActive(), DNSInput.restoreActive(), which seems straight forward to me. However, when setActive() was previously called higher up in the stack (in Record.newRecord()) .saveActive() does not return value that I would expect, the end of the currently active region, but instead the end of the buffer without the current value of limit on the inner ByteBuffer being considered.

Whether this is wrong or not is unclear to me but clearly the end result is undesirable

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0