Re: vmps request: long attribute VQP-Ethernet-Frame
Alan DeKok wrote:
0x0c05 is VQP-Ethernet-Frame, which can of course be longer than 253 bytes, so there is a design issue here. One idea would be to cut the attribute to 253 bytes in vqp_recv(). Could this be done there without memory issues ?
Yes, if you're not interested in the rest of the data.
appended is a patch which implemeted the cutting. Seems to work. Please tell me if anybody sees any pitfall in it. Otherwise it should be cleaned up, which I probably will do in a week or so. Thanks, Hermann -- Netzwerkadministration/Zentrale Dienste, Interdiziplinaeres Zentrum fuer wissenschaftliches Rechnen der Universitaet Heidelberg IWR; INF 368; 69120 Heidelberg; Tel: (06221)54-8236 Fax: -5224 Email: Hermann.Lauer@iwr.uni-heidelberg.de
Hermann Lauer wrote:
Alan DeKok wrote:
0x0c05 is VQP-Ethernet-Frame, which can of course be longer than 253 bytes, so there is a design issue here. One idea would be to cut the attribute to 253 bytes in vqp_recv(). Could this be done there without memory issues ? Yes, if you're not interested in the rest of the data.
appended is a patch which implemeted the cutting. Seems to work. Please tell me if anybody sees any pitfall in it.
Thanks. I've added a similar patch. Alan DeKok.
On Thu, Jan 29, 2009 at 05:04:34PM +0100, Hermann Lauer wrote:
Alan DeKok wrote:
0x0c05 is VQP-Ethernet-Frame, which can of course be longer than 253 bytes, so there is a design issue here. One idea would be to cut the attribute to 253 bytes in vqp_recv(). Could this be done there without memory issues ?
Yes, if you're not interested in the rest of the data.
Unfortunately the cutting solution which was included after the discussion above was no completely correct, because the vqp_recv routine has to skip the complete ethernet packet in checking as otherwise the rest would be interpeted as garbage, which makes the server rejecting the packet with a "Packet contains invalid attribute" message. The appended patch tries to fix this, but now memory errors occurs: *** glibc detected *** /usr/sbin/freeradius: corrupted double-linked list: 0x00166cd0 *** Aborted Any ideas ? Thanks, Hermann -- Netzwerkadministration/Zentrale Dienste, Interdiziplinaeres Zentrum fuer wissenschaftliches Rechnen der Universitaet Heidelberg IWR; INF 368; 69120 Heidelberg; Tel: (06221)54-8236 Fax: -5224 Email: Hermann.Lauer@iwr.uni-heidelberg.de
Hermann Lauer wrote:
Unfortunately the cutting solution which was included after the discussion above was no completely correct, because the vqp_recv routine has to skip the complete ethernet packet in checking as otherwise the rest would be interpeted as garbage, which makes the server rejecting the packet with a "Packet contains invalid attribute" message. The appended patch tries to fix this, but now memory errors occurs:
*** glibc detected *** /usr/sbin/freeradius: corrupted double-linked list: 0x00166cd0 *** Aborted
Any ideas ?
'attrlen' can't be more than 253, otherwise it overflows the buffer that is associated with the attribute. It's OK to *process* more than 253 bytes from a packet. You just can't *copy* more than 253 into the vp->vp_octets buffer. Alan DeKok.
On Mon, Jan 04, 2010 at 03:07:13PM +0100, Hermann Lauer wrote:
Unfortunately the cutting solution which was included after the discussion above was no completely correct, because the vqp_recv routine has to skip the complete ethernet packet in checking as otherwise the rest would be interpeted as garbage, which makes the server rejecting the packet with a "Packet contains invalid attribute" message. The appended patch tries to fix this, but now memory errors occurs:
shorted lenght must be used while copying, correct patch is attached.
Hermann Lauer wrote:
On Mon, Jan 04, 2010 at 03:07:13PM +0100, Hermann Lauer wrote:
Unfortunately the cutting solution which was included after the discussion above was no completely correct, because the vqp_recv routine has to skip the complete ethernet packet in checking as otherwise the rest would be interpeted as garbage, which makes the server rejecting the packet with a "Packet contains invalid attribute" message. The appended patch tries to fix this, but now memory errors occurs:
shorted lenght must be used while copying, correct patch is attached.
Fixed, thanks. Alan DeKok.
participants (2)
-
Alan DeKok -
Hermann Lauer