CVE 목록
Medium4.7유형: 운영체제

CVE-2022-49771

공개
2025년 5월 2일
수정
2026년 11월 6일
조회
0
상태
Analyzed
관련 내용 구글 검색하기한국어English
번역 대상이 아니에요. 원문(영어)만 제공돼요.
4.7Medium

개요

이 취약점이 무엇인지

In the Linux kernel, the following vulnerability has been resolved:

dm ioctl: fix misbehavior if list_versions races with module loading

__list_versions will first estimate the required space using the "dm_target_iterate(list_version_get_needed, &needed)" call and then will fill the space using the "dm_target_iterate(list_version_get_info, &iter_info)" call. Each of these calls locks the targets using the "down_read(&_lock)" and "up_read(&_lock)" calls, however between the first and second "dm_target_iterate" there is no lock held and the target modules can be loaded at this point, so the second "dm_target_iterate" call may need more space than what was the first "dm_target_iterate" returned.

The code tries to handle this overflow (see the beginning of list_version_get_info), however this handling is incorrect.

The code sets "param->data_size = param->data_start + needed" and "iter_info.end = (char *)vers+len" - "needed" is the size returned by the first dm_target_iterate call; "len" is the size of the buffer allocated by userspace.

"len" may be greater than "needed"; in this case, the code will write up to "len" bytes into the buffer, however param->data_size is set to "needed", so it may write data past the param->data_size value. The ioctl interface copies only up to param->data_size into userspace, thus part of the result will be truncated.

Fix this bug by setting "iter_info.end = (char *)vers + needed;" - this guarantees that the second "dm_target_iterate" call will write only up to the "needed" buffer and it will exit with "DM_BUFFER_FULL_FLAG" if it overflows the "needed" space - in this case, userspace will allocate a larger buffer and retry.

Note that there is also a bug in list_version_get_needed - we need to add "strlen(tt->name) + 1" to the needed size, not "strlen(tt->name)".

실제 악용 사례 · 아직 확인된 사례가 없어요

CISA의 KEV 카탈로그(실제 공격에 악용된 취약점 목록)에 아직 올라와 있지 않아요. 다만 ‘앞으로도 안전하다’는 뜻은 아니니 심각도와 EPSS를 함께 확인하세요.

패치 현황

어떤 버전이 위험하고, 몇 버전으로 올리면 되는지

제품시작끝이 버전 이상으로
linux_kernellinux최초 버전≤취약<4.9.3344.9.334이상
4.10≤취약<4.14.3004.14.300이상
4.15≤취약<4.19.2674.19.267이상
4.20≤취약<5.4.2255.4.225이상
5.5≤취약<5.10.1565.10.156이상
5.11≤취약<5.15.805.15.80이상
5.16≤취약<6.0.106.0.10이상
이 버전만취약=6.1 rc1벤더 공지 확인
이 버전만취약=6.1 rc2벤더 공지 확인
이 버전만취약=6.1 rc3벤더 공지 확인
이 버전만취약=6.1 rc4벤더 공지 확인
이 버전만취약=6.1 rc5벤더 공지 확인

NVD 분석 기준. 시작과 끝 사이 버전이 취약해요. ‘이 버전 이상으로’는 끝이 ‘<’로 적힌 경우에만 알 수 있어요.

할당 기관(CNA)이 적은 버전 10줄도 보기
제품시작끝이 버전 이상으로
LinuxLinux이 버전만취약=2.6.12벤더 공지 확인
최초 버전≤영향 없음<2.6.12—
4.9.334≤영향 없음≤4.9.*—
4.14.300≤영향 없음≤4.14.*—
4.19.267≤영향 없음≤4.19.*—
5.4.225≤영향 없음≤5.4.*—
5.10.156≤영향 없음≤5.10.*—
5.15.80≤영향 없음≤5.15.*—
6.0.10≤영향 없음≤6.0.*—
6.1≤영향 없음≤최신 버전—

참고 링크

NVD에 등록된 외부 자료예요. 익스플로잇·벤더 공지·패치 순으로 먼저 보여줘요.