🇰🇷 한글 설명
Linux 커널의 Classmate 노트북 드라이버(platform/x86)에서 accel 객체가 드라이버 데이터에 등록되기 전에 접근될 수 있어 NULL 포인터 역참조가 발생할 수 있습니다. 이를 막기 위해 관련 위치에 NULL 포인터 검사가 추가되었습니다.
💡 쉬운 설명
일부 노트북 센서 제어 기능이 준비되기 전에 호출되면 프로그램이 비정상 종료될 수 있는 문제입니다. 커널 패치로 준비 여부를 확인하도록 수정되었습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
platform/x86: classmate-laptop: Add missing NULL pointer checks
In a few places in the Classmate laptop driver, code using the accel
object may run before that object's address is stored in the driver
data of the input device using it.
For example, cmpc_accel_sensitivity_store_v4() is the "show" method
of cmpc_accel_sensitivity_attr_v4 which is added in cmpc_accel_add_v4(),
before calling dev_set_drvdata() for inputdev->dev. If the sysfs
attribute is accessed prematurely, the dev_get_drvdata(&inputdev->dev)
call in in cmpc_accel_sensitivity_store_v4() returns NULL which
leads to a NULL pointer dereference going forward.
Moreover, sysfs attributes using the input device are added before
initializing that device by cmpc_add_acpi_notify_device() and if one
of them is accessed before running that function, a NULL pointer
dereference will occur.
For example, cmpc_accel_sensitivity_attr_v4 is added before calling
cmpc_add_acpi_notify_device() and if it is read prematurely, the
dev_get_drvdata(&acpi->dev) call in cmpc_accel_sensitivity_show_v4()
returns NULL which leads to a NULL pointer dereference going forward.
Fix this by adding NULL pointer checks in all of the relevant places.
📍 영향받는 시스템
Linux 커널의 platform/x86 classmate-laptop 드라이버를 포함하는 빌드 (Classmate 계열 노트북 환경)
⚔️ 공격 벡터
로컬 사용자가 드라이버 초기화 완료 전에 해당 sysfs 속성을 읽어 커널 NULL 포인터 역참조를 유발하는 방식
🛡️ 대응 방법
배포판이 제공하는 최신 Linux 커널 보안 업데이트를 적용하고 재부팅합니다.
🔧 검증 코드
커널 버전이 패치가 포함된 배포판 업데이트 이후인지 확인하고, classmate_laptop 모듈이 로드되지 않았다면 이 취약점의 영향을 받지 않습니다.
uname -r && (lsmod | grep -i classmate || echo 'classmate_laptop 모듈 미로드')