Hi,
I'm aware of the restrictions on US citizens.
So I'm not going to contribute a patch.
And forgive me if I don't adhere to the normal bug report format.

I would strongly advise you to check the code in
apps/req.c, function build_subject
apps/ca.c, function do_subject 

I wanted the snapshot of openCA 20020503 and discovered they want
the -subj option on openssl req & openssl ca.
That's why I'm snooping around your 0.9.7 snapshot 20020514.
It's still there in 20020516.
My system is RH7.3 linux 2.4.18-3 (redhat build)

My symptoms were segmentation faults.
The "free (buf)" on line 1251(apps/req.c) and 
the "free (buf)" on line 3117(apps/ca.c) caused it.

It's the funtions that handles the new -subj option.
(There may be more, I don't know).

I had been on this project for over 18 hours, so I just added some
extra size to the buflen for malloc & this cleared my segmentation
faults & allowed me to progress on openCA.  This is definately not
a fix.  It is just a fudge factor.

Looking at apps/req.c again, I believe the value sub-string is getting a
"\0" at line 1214 and again at line 1220
for all but the last sub-field
The function in apps/ca.c is virtually identical but with
line numbers 3084 & 3090.
It's causing the problem on subj's with more than 2+"number-of-escapes"
sub-fields.

so on 3 fields, no escapes buf builds like this:
       DN /aa=bb/cc=dd/ee=ff0
buf alloc ...................
      buf aa0bb00cc0dd00ee0ff0

Might I suggest killing the first "\0" at the break &
leaving the second one where it breaks to?
That way it's covered at end of string
where a final trailing "/" is normally(?) missing.

Even if you don't like my thoughts, would you please look at
this and find some solution?

-- 
Doug VanLeuven
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to