[syslinux] PXE stack access via com32

H. Peter Anvin hpa at zytor.com
Sat Jan 6 11:16:22 PST 2007


jesse barker wrote:
> 
> I started with a PXENV_GET_CACHED_INFO struct as described in the spec (version 2.1).  I filled it out like this:
> 
> s_PXENV_GET_CACHED_INFO args;
> BOOTPLAYER cachedInfo; /* As described on page 50 of PXE 2.1 */
> 
> memset(&args, 0, sizeof(args));
> memset(&cachedInfo, 0, sizeof(cachedInfo));
> 
> args.PacketType = PXENV_PACKET_TYPE_DHCP_ACK; /* 2 */
> args.BufferSize = sizeof(cachedInfo);
> args.Buffer.segment = SEG(&cachedInfo);
> args.Buffer.offset = OFFS(&cachedInfo);
> 
> memcpy(__com32.cs_bounce, &args, sizeof(args);

cachedInfo also needs to be in the bounce buffer!  Here you're 
allocating it out of high memory, so the SEG:OFFS pointer that it 
produces is totally random (and invalid.)

	-hpa




More information about the Syslinux mailing list