🇰🇷 한글 설명
Linux 커널의 parport 서브시스템에서 포트와 클라이언트 등록 간의 레이스 컨디션(경쟁 상태) 취약점이 발견되었습니다. 포트 장치가 완전히 초기화되기 전에 등록되어 클라이언트 드라이버가 미완성된 포트에 연결을 시도할 경우 시스템 충돌이 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터 부팅 시 장치 드라이버들이 서로 준비가 덜 된 상태에서 동시에 작동하려고 하다가 충돌이 발생하는 문제입니다. 이로 인해 시스템이 갑자기 멈추거나 꺼질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
parport: Fix race between port and client registration
The parport subsystem registers port devices before they are fully
initialised, resulting in a race condition where client drivers such
as lp can attach to ports that are not completely initialised or even
being torn down.
When the port and client drivers are built as modules and loaded
around the same time during boot, this occasionally results in a
crash. I was able to make this happen reliably in a VM with a
PC-style parallel port by patching parport_pc to fail probing:
> --- a/drivers/parport/parport_pc.c
> +++ b/drivers/parport/parport_pc.c
> @@ -2069,7 +2069,7 @@ static struct parport *__parport_pc_probe_port(unsigned long int base,
> if (!p)
> goto out3;
>
> - base_res = request_region(base, 3, p->name);
> + base_res = NULL;
> if (!base_res)
> goto out4;
>
and then running:
while true; do
modprobe lp & modprobe parport_pc
wait
rmmod lp parport_pc
done
for a few seconds.
In the long term I think port registration should be changed to put
the call to device_add() inside parport_announce_port(), but since the
latter currently cannot fail this will require changing all port
drivers.
For now, add a flag to indicate whether a port has been "announced"
and only try to attach client drivers to ports when the flag is set.
📍 영향받는 시스템
Linux Kernel (parport subsystem 사용 시스템)
⚔️ 공격 벡터
부팅 과정 중 특정 모듈(lp, parport_pc)이 동시에 로드될 때 발생하는 타이밍 공격 또는 시스템 불안정 유발
🛡️ 대응 방법
Linux 커널을 최신 패치가 적용된 버전으로 업데이트하여 parport 등록 로직을 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.