OpenOffice WMF/EMF文件处理堆溢出漏洞

- AV AC AU C I A
发布: 2025-04-13
修订: 2025-04-13

OpenOffice是个整合性的软件,包含了许多文字处理、表格、公式等办公工具。 OpenOffice在处理META_ESCAPE记录时存在截尾错误。在svtools\source\filter.vcl\wmf\winwmf.cxx文件中: case W_META_ESCAPE : ... sal_uInt32 i, nStringLen, nDXCount; ... aMemoryStream >> aPt.X() >> aPt.Y() >> nStringLen; sal_Unicode* pBuf = aString.AllocBuffer( (sal_uInt16)nStringLen ); for ( i = 0; i < nStringLen; i++ ) aMemoryStream >> pBuf[ i ]; nStringLen为sal_uInt32,被放到了sal_uInt16进行分配然后将最初的32位值用作了计数填充缓冲区,因此任何大于0xFFFF的长度都可能导致堆溢出。如果用户受骗打开了恶意的WMF文件或嵌入了该文件的文档(如Microsoft Word文档)的话,就可能导致通过覆盖函数指针或DWORD执行任意代码。 OpenOffice在处理EMR_POLYPOLYGON和EMR_POLYPOLYGON16记录时还存在整数溢出。在svtools\source\filter.vcl\wmf\enhwmf.cxx文件中: case EMR_POLYPOLYGON : INT32 i, nPoly, nGesPoints; ... *pWMF >> nPoly >> nGesPoints; ... pPtAry = (Point*) new char[ nGesPoints * sizeof(Point) ]; for ( i = 0; i < nGesPoints; i++ ) { *pWMF >> nX32 >> nY32; pPtAry[ i ] = Point( nX32, nY32 ); } 如果nGesPoints > (0x100000000/sizeof(Point))的话,nGesPoints *...

0%
暂无可用Exp或PoC
当前有0条受影响产品信息