Illegal muitibyte sequence at charcnv.c

TAKAHASHI Motonobu monyo at home.monyo.com
Mon Jun 23 14:06:36 GMT 2003


Hello,

I checked Samba 3.0.0beta1 and have a design change request.

At charcnv.c:165, if we get EILSEC from smb_iconv(), then smb_panic()
is called. For example,

[2003/06/18 03:04:04, 0] lib/charcnv.c:convert_string_allocate(248)
  Conversion error: Illegal multibyte sequence(<90>V<82>t<83>H<83><8B><83>_)
[2003/06/18 03:04:04, 0] lib/util.c:smb_panic(1462)
  PANIC: failed to create UCS2 buffer

I think that to simply ignore those names or to mangle them and log
them is better. In Japan we may have files whose name is encoded with
different method (for example, CP932 and EUC-JP). The reason is mainly
that some applications can recognize only a paticular encode method.

And current implementation allows a kind of DoS simply to put an
illegal filename on a share.

Also actually these are still bugs around code conversion, now code
conversion bug often stops [sn]mbd, this is not good, I think.

-----
TAKAHASHI, Motonobu (monyo)                    monyo at home.monyo.com
                                               http://www.monyo.com/




More information about the samba-technical mailing list