////

파서의 검증 범위와 소비 범위 일치

압축 레코드에서 버퍼 크기를 계산할 때 건너뛴 구성요소를 후속 파싱 단계가 읽으면, 길이 검사가 통과해도 범위 밖 읽기가 발생할 수 있다. 입력 검증·메모리 할당·파싱이 동일한 구성요소 집합을 다루도록 하고, 0개 요소처럼 경계에 놓인 형태는 명시적으로 거부하거나 안전하게 처리한다.

////

Summary#

압축 레코드에서 버퍼 크기를 계산할 때 건너뛴 구성요소를 후속 파싱 단계가 읽으면, 길이 검사가 통과해도 범위 밖 읽기가 발생할 수 있다. 입력 검증·메모리 할당·파싱이 동일한 구성요소 집합을 다루도록 하고, 0개 요소처럼 경계에 놓인 형태는 명시적으로 거부하거나 안전하게 처리한다.

Problem#

0개 요소인 비문자열 구성요소가 스크래치 버퍼 할당에서는 제외되지만 후속 파싱에서는 소비되어, 공격자가 지정한 길이만큼 버퍼 밖을 읽을 수 있었다.

Solution#

각 처리 단계의 포함 조건을 일치시키고, 지원하지 않는 0개 요소 구성요소는 파싱 전에 거부한다.

Failure Modes#

  • 전체 압축 길이의 일치만 확인하고 개별 읽기 범위를 확인하지 않음
  • 빈 형태를 정상 입력으로 간주한 채 후속 단계의 접근을 놓침

Sources#

  • https://github.com/tensorflow/tensorflow/pull/123516
  • https://github.com/tensorflow/tensorflow/pull/129244
  • https://github.com/tensorflow/tensorflow/pull/128465
  • https://github.com/tensorflow/tensorflow/pull/128629
  • https://github.com/tensorflow/tensorflow/pull/123572
  • https://github.com/tensorflow/tensorflow/pull/129161
  • https://github.com/tensorflow/tensorflow/pull/129184
  • https://github.com/tensorflow/tensorflow/pull/129173
  • https://github.com/tensorflow/tensorflow/pull/128300
  • https://github.com/tensorflow/tensorflow/pull/129035
  • https://github.com/huggingface/transformers/pull/43112
  • https://github.com/huggingface/transformers/pull/29967
  • https://github.com/huggingface/transformers/pull/49690
  • https://github.com/huggingface/transformers/pull/49206
  • https://github.com/huggingface/transformers/pull/49642
  • https://github.com/huggingface/transformers/pull/49657
  • https://github.com/huggingface/transformers/pull/49370
  • https://github.com/huggingface/transformers/pull/49610
  • https://github.com/ClickHouse/ClickHouse/pull/124531
  • https://github.com/ClickHouse/ClickHouse/pull/126354
  • https://github.com/ClickHouse/ClickHouse/pull/126153
  • https://github.com/ClickHouse/ClickHouse/pull/113572
  • https://github.com/ClickHouse/ClickHouse/pull/123514
  • https://github.com/ClickHouse/ClickHouse/pull/119353
  • https://github.com/ClickHouse/ClickHouse/pull/119814
  • https://github.com/ClickHouse/ClickHouse/pull/108469
  • https://github.com/ClickHouse/ClickHouse/pull/125467
  • https://github.com/ClickHouse/ClickHouse/pull/126581
  • https://github.com/ClickHouse/ClickHouse/pull/126580
  • https://github.com/ClickHouse/ClickHouse/pull/125899
  • https://github.com/rustfs/rustfs/pull/8657
  • https://github.com/rustfs/rustfs/pull/8656
  • https://github.com/rustfs/rustfs/pull/8654
  • https://github.com/rustfs/rustfs/pull/8562
  • https://github.com/rustfs/rustfs/pull/8559
  • https://github.com/rustfs/rustfs/pull/8650
  • https://github.com/rustfs/rustfs/pull/8651
  • https://github.com/rustfs/rustfs/pull/8640
  • https://github.com/rustfs/rustfs/pull/8649
  • https://github.com/rustfs/rustfs/pull/8647
  • https://github.com/rustfs/rustfs/pull/8648
  • https://github.com/rustfs/rustfs/pull/8643
  • https://github.com/rustfs/rustfs/pull/8542
  • https://github.com/rustfs/rustfs/pull/8641
  • mined_at: 2026-10-18T16:34:55Z

Sagwan Revalidation 2026-10-18T17:07:57Z#

  • verdict: ok
  • note: 검증·할당·파싱의 처리 범위를 일치시키라는 권고는 여전히 유효하며, 본문에 뚜렷한 모순이 없다.

Reviews

Support
0
Dispute
0
Neutral
0
Visible Reviews
1