Message-ID: <2F7D63A21DB2C74EB8EB8C09AF667DB04A33DC@eitc220.eitc.epson.com> From: "Petrie, Glen" Date: Fri, 2 Apr 2004 08:26:56 -0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C418CF.50B6F140" Subject: [Printing-architecture] Security and Malloc List-Id: Printing architecture under linux List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: printing-architecture@freestandards.org This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C418CF.50B6F140 Content-Type: text/plain Norm and Ira, Thanks for the discussion on external supplied malloc, realloc and free yesterday. The use of supplied memory functions was only intended for the case of static/dynamic libraries since the client/service and application would internal solve the memory function issue. I believe your security case was that someone could send "harmful" memory function pointers (pointer to function) that would allow "break into" or cause a security breach. I understand this to a point but would like to understand more. Since in either case the library must be used with a main application and if the intent of the main application was to implement a security breach or have "harmful code"; then I contend that the main application could do this independent of any FSG library. Or they could modify the source that we supply for our libraries (we are an open-source activity) or they created their own library (with "harmful code") based on the API. I don't believe you could ever protect against this; so there is no solution to this specific security risk. So this only leaves the situation of proprietary library instantiation in which source is "never" supplied. That is, the main wants to send "harmful code" to a proprietary library instantiation. But again since the main can contain the "harmful code" is this case (of proprietary library instantiation) really a risk case? A compromise to this situation is to use #defines for the memory function in the open source distributions. For example, #define fsgMalloc malloc #define fsgRemalloc realloc #define . . . . Now before compiling the developer could change the malloc, realloc, etc to there specific memory functions. If this is more agreeable that sending pointers to functions; then what is the complete list of memory functions needed? I not think this can be optional; we need to make it mandatory or not implement it at all. ----------------------- Although I am still in favor of the InitializeAPI and ReleaseAPI, I believe that for open-source versions of the API libraries, this capability can be integrated independent of the any FSG specification. The problem arises for proprietary library implementations or in services where it would not be possible to integration the additional control. If you truly want or it is a requirement for a library to be stateless (i.e. no check if it has been initialized or other state conditions) then I see no way to implement these two functions. The solution using proprietary library implementations and needing this functionality is to not use static libraries, load/remove dlls went needed and/or start/kill services. More restrictive but would "meet the need". I not think this can be optional; we need to make it mandatory or not implement it at all. Rgds, Glen W. Petrie Epson Imaging Technology Center 150 River Oaks Parkway, Suite 200 San Jose, CA, 95134 Voice: 408.576.4131 Fax: 408.474.0511 ------_=_NextPart_001_01C418CF.50B6F140 Content-Type: text/html Content-Transfer-Encoding: quoted-printable

Norm and Ira,

 

Thanks for the discussion on external = supplied malloc, realloc and free yesterday.   The use of supplied memory = functions was only intended for the case of static/dynamic libraries since the = client/service and application would internal solve the memory function issue.  I = believe your security case was that someone could send “harmful” = memory function pointers (pointer to function) that would allow “break = into” or cause a security breach.  I understand this to a point but = would like to understand more.  Since in either case the library must be used = with a main application and if the intent of the main application was to = implement a security breach or have “harmful code”; then I contend that = the main application could do this independent of any FSG library.  Or = they could modify the source that we supply for our libraries (we are an = open-source activity) or they created their own library (with “harmful = code”) based on the API.   I don’t believe you could ever = protect against this; so there is no solution to this specific security risk. =  So this only leaves the situation of proprietary library instantiation in which = source is “never” supplied.  That is, the main wants to send = “harmful code” to a proprietary library instantiation.  But again = since the main can contain the “harmful code” is this case (of = proprietary library instantiation) really a risk case?

 

A compromise to this situation is to use = #defines for the memory function in the open source distributions. For = example,

 

#define fsgMalloc    = malloc 

#define fsgRemalloc  = realloc

#define  . . . . =

 

Now before compiling the developer could = change the malloc, realloc, etc to there specific memory functions.  If this = is more agreeable that sending pointers to functions; then what is the complete = list of memory functions needed?

 

I not think this can be optional; we need to = make it mandatory or not implement it at all.

 

-----------------------

 

Although I am still in favor of the = InitializeAPI and ReleaseAPI, I believe that for open-source versions of the API = libraries, this capability can be integrated independent of the any FSG = specification.   The problem arises for proprietary library implementations or in services = where it would not be possible to integration the additional control.  If = you truly want or it is a requirement for a library to be stateless (i.e. no = check if it has been initialized or other state conditions) then I see no way to = implement these two functions.  The solution using proprietary library = implementations and needing this functionality is to not use static libraries, = load/remove dlls went needed and/or start/kill services.  More restrictive but = would “meet the need”.

 

I not think this can be optional; we need to = make it mandatory or not implement it at all.

 

 

Rgds,
Glen W. = Petrie
Epson Imaging Technology Center =
150 River Oaks Parkway, Suite 200 =
San Jose, CA, 95134
Voice: 408.576.4131  Fax: = 408.474.0511

 

------_=_NextPart_001_01C418CF.50B6F140--