🇰🇷 한글 설명
Linux 커널의 mtd spi-nor swp 드라이버에서 잠금 해제 로직 오류가 발견되었습니다. 특정 블록이 잠겨 있는 상태에서 전체 장치를 잠금 해제하려고 시도할 때, 계산 오류로 인해 잠금 해제 요청이 실패하는 문제가 있습니다.
💡 쉬운 설명
기기 일부가 잠겨 있을 때 전체 잠금을 풀려고 하면 시스템이 계산을 잘못하여 실패하는 버그입니다. 이로 인해 사용자가 의도한 대로 장치의 잠금을 해제하지 못하는 불편함이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
mtd: spi-nor: swp: Improve locking user experience
In the case of the first block being locked (or the few first blocks),
if the user want to fully unlock the device it has two possibilities:
- either it asks to unlock the entire device, and this works;
- or it asks to unlock just the block(s) that are currently locked,
which fails.
It fails because the conditions "can_be_top" and "can_be_bottom" are
true. Indeed, in this case, we unlock everything, so the TB bit does not
matter. However in the current implementation, use_top would be true (as
this is the favourite option) and lock_len, which in practice should be
reduced down to 0, is set to "nor->params->size - (ofs + len)" which is
a positive number. This is wrong.
An easy way is to simply add an extra condition. In the unlock() path,
if we can achieve the same result from both sides, it means we unlock
everything and lock_len must simply be 0. A comment is added to clarify
that logic.
📍 영향받는 시스템
Linux kernel (mtd: spi-nor: swp 관련 모듈 사용 시)
⚔️ 공격 벡터
로컬 권한을 가진 사용자가 특정 mtd 장치의 잠금 해제 명령을 수행할 때 발생 (DoS 또는 기능 오작동)
🛡️ 대응 방법
Linux 커널을 최신 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.