Changeset 732 for branches/samba-3.5.x/source3/smbd/process.c
- Timestamp:
- Nov 12, 2012, 4:35:55 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.5.x/source3/smbd/process.c
r599 r732 1910 1910 1911 1911 /* 1912 * Check if the client tries to fool us. The request so far uses the 1913 * space to the end of the byte buffer in the request just 1914 * processed. The chain_offset can't point into that area. If that was 1915 * the case, we could end up with an endless processing of the chain, 1916 * we would always handle the same request. 1917 */ 1918 1919 already_used = PTR_DIFF(req->buf+req->buflen, smb_base(req->inbuf)); 1920 if (chain_offset < already_used) { 1912 * Check if the client tries to fool us. The chain offset 1913 * needs to point beyond the current request in the chain, it 1914 * needs to strictly grow. Otherwise we might be tricked into 1915 * an endless loop always processing the same request over and 1916 * over again. We used to assume that vwv and the byte buffer 1917 * array in a chain are always attached, but OS/2 the 1918 * Write&X/Read&X chain puts the Read&X vwv array right behind 1919 * the Write&X vwv chain. The Write&X bcc array is put behind 1920 * the Read&X vwv array. So now we check whether the chain 1921 * offset points strictly behind the previous vwv 1922 * array. req->buf points right after the vwv array of the 1923 * previous request. See 1924 * https://bugzilla.samba.org/show_bug.cgi?id=8360 for more 1925 * information. 1926 */ 1927 1928 already_used = PTR_DIFF(req->buf, smb_base(req->inbuf)); 1929 if (chain_offset <= already_used) { 1921 1930 goto error; 1922 1931 }
Note:
See TracChangeset
for help on using the changeset viewer.