From: "Oleg Gvozdev" <123.oleg@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: LINUX kernel 2.6.23: bug in CIFSSMBSetEA
Date: Mon, 24 Dec 2007 23:42:38 +0300 [thread overview]
Message-ID: <af57f1ac0712241242w24397e42p320283f39e7fed37@mail.gmail.com> (raw)
Hello
In fs/cifs/cifssmb.c, in CIFSSMBSetEA (...) function wrong counting of
var exists.
EXISTING CODE:
pSMB->DataCount = sizeof(*parm_data) + ea_value_len + name_len + 1;
MUST BE:
pSMB->DataCount = sizeof(*parm_data) + ea_value_len + name_len;
REASON:
"sizeof(*parm_data)" counts 1 byte from "char name[1];"
So, for example in Samba server (sources/smbd/trans2.c), we can see
wrong processing of EA, cause data sent to server is bigger on 1 byte
then it must be.
See Extra info for details
--------------------------------------------- Extra info
struct fealist *parm_data;
1707 struct fea {
1708 unsigned char EA_flags;
1709 __u8 name_len;
1710 __u16 value_len;
1711 char name[1];
1712 /* optionally followed by value */
1713 };
1714 /* flags for _FEA.fEA */
1715 #define FEA_NEEDEA 0x80 /* need EA bit */
1716
1717 struct fealist {
1718 __u32 list_len;
1719 struct fea list[1];
1720 };
next reply other threads:[~2007-12-24 20:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-24 20:42 Oleg Gvozdev [this message]
2007-12-31 0:24 Steve French
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=af57f1ac0712241242w24397e42p320283f39e7fed37@mail.gmail.com \
--to=123.oleg@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®