CVE-2003-0102 (CNNVD-200303-058)
中文标题:
file工具本地缓冲区溢出漏洞
英文标题:
Buffer overflow in tryelf() in readelf.c of the file command allows attackers to execute arbitrary c...
漏洞描述
中文描述:
file(1)是一款查看文件类型的工具。 file(1)命令存在一个缓冲区溢出漏洞,本地攻击者可以利用这个漏洞以执行用户权限在系统上执行任意指令。 问题存在于readelf.c中的587行tryelf()函数的doshn()调用中: doshn(class, swap, fd, getu32(swap, elfhdr.e_shoff), getu16(swap, elfhdr.e_shnum), getu16(swap, elfhdr.e_shentsize)); doshn() 'elfhdr.e_shentsize'最后一个参数将在之后用于readelf.c 133行的read()函数中: if (read(fd, sh_addr, size) == -1) read()调用会拷贝'size'字节到readelf.c 92行定义的'sh_addr'变量中: #define sh_addr (class == ELFCLASS32 \ ? (void *) &sh32 \ : (void *) &sh64) 用于read()函数的缓冲区大小只有0x20 (32)字节,通过提供0x28 (40)字节的'size'参数可导致覆盖堆栈中的EBP和EIP寄存器而以其他用户权限执行任意代码。 用户可以构建恶意文件诱使其他用户来分析,导致发生缓冲区溢出,而以执行用户权限执行任意指令。
英文描述:
Buffer overflow in tryelf() in readelf.c of the file command allows attackers to execute arbitrary code as the user running file, possibly via a large entity size value in an ELF header (elfhdr.e_shentsize).
CWE类型:
标签:
受影响产品
| 厂商 | 产品 | 版本 | 版本范围 | 平台 | CPE |
|---|---|---|---|---|---|
| file | file | 3.28 | - | - |
cpe:2.3:a:file:file:3.28:*:*:*:*:*:*:*
|
| file | file | 3.30 | - | - |
cpe:2.3:a:file:file:3.30:*:*:*:*:*:*:*
|
| file | file | 3.32 | - | - |
cpe:2.3:a:file:file:3.32:*:*:*:*:*:*:*
|
| file | file | 3.33 | - | - |
cpe:2.3:a:file:file:3.33:*:*:*:*:*:*:*
|
| file | file | 3.34 | - | - |
cpe:2.3:a:file:file:3.34:*:*:*:*:*:*:*
|
| file | file | 3.35 | - | - |
cpe:2.3:a:file:file:3.35:*:*:*:*:*:*:*
|
| file | file | 3.36 | - | - |
cpe:2.3:a:file:file:3.36:*:*:*:*:*:*:*
|
| file | file | 3.37 | - | - |
cpe:2.3:a:file:file:3.37:*:*:*:*:*:*:*
|
| file | file | 3.39 | - | - |
cpe:2.3:a:file:file:3.39:*:*:*:*:*:*:*
|
| file | file | 3.40 | - | - |
cpe:2.3:a:file:file:3.40:*:*:*:*:*:*:*
|
| netbsd | netbsd | 1.5 | - | - |
cpe:2.3:o:netbsd:netbsd:1.5:*:*:*:*:*:*:*
|
| netbsd | netbsd | 1.5.1 | - | - |
cpe:2.3:o:netbsd:netbsd:1.5.1:*:*:*:*:*:*:*
|
| netbsd | netbsd | 1.5.2 | - | - |
cpe:2.3:o:netbsd:netbsd:1.5.2:*:*:*:*:*:*:*
|
| netbsd | netbsd | 1.5.3 | - | - |
cpe:2.3:o:netbsd:netbsd:1.5.3:*:*:*:*:*:*:*
|
| netbsd | netbsd | 1.6 | - | - |
cpe:2.3:o:netbsd:netbsd:1.6:*:*:*:*:*:*:*
|
解决方案
中文解决方案:
英文解决方案:
临时解决方案:
参考链接
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
exploitdb
exploitdb
cve.org
exploitdb
exploitdb
CVSS评分详情
AV:L/AC:L/Au:N/C:P/I:P/A:P
时间信息
利用信息
数据源详情
| 数据源 | 记录ID | 版本 | 提取时间 |
|---|---|---|---|
| CVE | cve_CVE-2003-0102 |
2025-11-11 15:17:26 | 2025-11-11 07:32:18 |
| NVD | nvd_CVE-2003-0102 |
2025-11-11 14:50:37 | 2025-11-11 07:41:04 |
| CNNVD | cnnvd_CNNVD-200303-058 |
2025-11-11 15:08:42 | 2025-11-11 07:48:50 |
| EXPLOITDB | exploitdb_EDB-22324 |
2025-11-11 15:05:48 | 2025-11-11 08:17:08 |
| EXPLOITDB | exploitdb_EDB-22325 |
2025-11-11 15:05:48 | 2025-11-11 08:17:08 |
版本与语言
安全公告
变更历史
查看详细变更
- references_count: 15 -> 17
- tags_count: 4 -> 5
查看详细变更
- references_count: 12 -> 15
- tags_count: 0 -> 4
- data_sources: ['cnnvd', 'cve', 'nvd'] -> ['cnnvd', 'cve', 'exploitdb', 'nvd']
查看详细变更
- vulnerability_type: 未提取 -> 授权问题
- cnnvd_id: 未提取 -> CNNVD-200303-058
- data_sources: ['cve', 'nvd'] -> ['cnnvd', 'cve', 'nvd']
查看详细变更
- cvss_score: 未提取 -> 4.6
- cvss_vector: NOT_EXTRACTED -> AV:L/AC:L/Au:N/C:P/I:P/A:P
- cvss_version: NOT_EXTRACTED -> 2.0
- affected_products_count: 0 -> 15
- data_sources: ['cve'] -> ['cve', 'nvd']