Comments concerning TR 24731



TR 24731 is a proposal for making the C library more secure.
It is a welcome addition and it goes in the direction I have been
arguing since a long time.

It doesn't go to the root of the problem though, since
even if the programmer is supposed to pass the size of
the buffers to the secure functions, it would be far
better that the size would be an integral part of the
buffer like:

typedef struct _d_buffer {
size_t size;
unsigned char *data;
} DynamicBuffer; // This one is resizable

typedef struct _s_buffer {
size_t size;
unsigned char data[];
} StaticBuffer; // This one is not resizable

This would eliminate the errors of passing a wrong buffer size.

But anyway, it is much better than the current situation.

I am trying to implement this stuff, and there are portions of the
specification that are unclear, specially in a multi-threaded
environment:

We have the "set_constraint_handler" function, that sets the
(apparently global) constraint handler. Unspecified is what that
could mean in a ulti-threaded (or multi-tasking) environment.

Should each thread have its own handlers isn't it?

Other unclear points are the behavior when a stream is passed
to a library function and ferror is true or feof is true. As far
as I see this is not specified.

jacob



.



Relevant Pages

  • Re: Comments concerning TR 24731
    ... most implementations of buffer objects do that. ... environment. ... that would set the constraint handler for the given thread, ... could mean in a ulti-threaded (or multi-tasking) environment. ...
    (comp.std.c)
  • Re: Medico-legal problem
    ... If you want to accomplish this, you would need to release the file in an MDE ... the tables and queries from all the users. ... MS Access is most likely not the environment to use if you truly need ... Yes, the database is secure, with user logins and passwords, usergroups, ...
    (microsoft.public.access.forms)
  • Re: Secure CRT questions
    ... >Nollie, from your original post, I understood that you wanted to be able to ... >have a single piece of code that compiles to the secure routines under VS8 ... Actually, the buffer doesn't have to be dynamic, so ...
    (microsoft.public.vc.language)
  • Re: webmail application for production?
    ... > I don't want to take any security risk here, so i really need a secure ... I currently use both Squirrelmail and Horde/IMP in production. ...
    (RedHat)
  • Re: How to disable _SECURE_ATL macro
    ... deprecating memcpy in favor of ... > the problem with memcpy is that if you are interacting with code that you ... clearly defines the size of the buffer accessed. ... is about Secure SCL which most definitely is not "much safer". ...
    (microsoft.public.dotnet.languages.vc)