[ 
https://issues.apache.org/jira/browse/AVRO-4284?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ismaël Mejía reassigned AVRO-4284:
----------------------------------

    Assignee: Ismaël Mejía

> [c] Enforce a maximum decompressed block size
> ---------------------------------------------
>
>                 Key: AVRO-4284
>                 URL: https://issues.apache.org/jira/browse/AVRO-4284
>             Project: Apache Avro
>          Issue Type: Sub-task
>          Components: c
>    Affects Versions: 1.11.5, 1.12.1
>            Reporter: Ismaël Mejía
>            Assignee: Ismaël Mejía
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.12.2
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> When reading a data file, {{lang/c/src/codec.c}} decompresses each block 
> without bounding the output size: {{decode_deflate}} doubles the output 
> buffer until the stream ends, {{decode_snappy}} allocates the 
> attacker-declared uncompressed length, and {{decode_lzma}} doubles the buffer 
> until done. The block is read in {{lang/c/src/datafile.c}}.
> Enforce a configurable maximum decompressed size in each codec, defaulting to 
> a runtime-safe value (overridable, e.g. via the AVRO_MAX_DECOMPRESS_LENGTH 
> environment variable), and fail decoding with a clear error when a block 
> would exceed it. Add a test with a high-ratio block.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to