Changeset 694


Ignore:
Timestamp:
Mar 12, 2012, 8:25:09 AM (13 years ago)
Author:
Herwig Bauernfeind
Message:

Update Samba 3.3 with CVE-2012-0870 security patch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/source/smbd/process.c

    r578 r694  
    16571657
    16581658        int smb_com1, smb_com2 = CVAL(inbuf,smb_vwv0);
    1659         unsigned smb_off2 = SVAL(inbuf,smb_vwv1);
     1659        static unsigned smb_off2;
    16601660        char *inbuf2;
    16611661        int outsize2;
     
    16821682                orig_inbuf = inbuf;
    16831683                orig_size = size;
    1684         }
    1685 
     1684                smb_off2 = 0;
     1685        }
     1686 
     1687        if (SVAL(inbuf,smb_vwv1) <= smb_off2) {
     1688                DEBUG(1, ("AndX offset not increasing\n"));
     1689                SCVAL(outbuf, smb_vwv0, 0xFF);
     1690                return;
     1691        }
     1692        smb_off2 = SVAL(inbuf, smb_vwv1);
     1693 
    16861694        /* Validate smb_off2 */
    16871695        if ((smb_off2 < smb_wct - 4) || orig_size < (smb_off2 + 4 - smb_wct)) {
Note: See TracChangeset for help on using the changeset viewer.