Blog dedicated to Oracle Applications (E-Business Suite) Technology; covers Apps Architecture, Administration and third party bolt-ons to Apps

Friday, December 7, 2007

Help About option in forms displays blank for Forms version and session

Akhilesh told me about a problem in one of his Apps instances which was recently upgraded to 10g. He said that if we go to any forms session and click on Help menu - > About, usually it displays information about the Application version, Forms version, DB session id and a lot of other details. However in this particular instance, he said that the Forms version was blank and the session information was also blank. He had even logged an SR with Oracle without any success. Metalink Note 436110.1 describes the very same issue in R12, however our instance was 11i. This is what it says:

Symptoms

On fresh install of release 12.0.1, the forms server version is not shown in the About Oracle Applications window.

EXPECTED BEHAVIOR
Expect the version to be displayed

STEPS
The issue can be reproduced at will with the following steps:
1. Navigate to the About Oracle Applications window.
2. Scroll down to the "Forms Server" section.

BUSINESS IMPACT
Due to this issue, users cannot determine the version of the Forms server.

Changes

Fresh install of Release 12 with RUP1

Cause

Appears the System Profile Option "FND: Diagnostics is set to No

Solution

SQL> select fnd_profile.value('FND_DIAGNOSTICS') from dual;
If it returns a value of No then set this to 'Y' and retry.

Once you change System Profile Option "FND: Diagnostics" to " Y, you are able to see the Forms Server Information from Help About Oracle Applications.


I changed FND:Diagnostics to Y on site level. Closed the forms session and launched it again from self service. The forms version information was now visible .

Wednesday, December 5, 2007

Adventures with DBUA

In a 9.2.0.8 to 10.2.0.3 upgrade we used DBUA (Database Upgrade Assistant). Unfortunately after running smoothly till the progress bar reached 50%, we got the following errors which we ignored:

Error ignored: ORA-04045: errors during recompilation/revalidation of SYS.KU$_FHTABLE_VIEW ORA-04031: unable to allocate 32 bytes of shared memory ("shared pool","select
Error ignored: ORA-00604: error occurred at recursive SQL level 1 ORA-04031: unable to allocate 4120 bytes of shared memory ("shared
Error ignored: ORA-04031: unable to allocate 216 bytes of shared memory ("shared
Error ignored: ORA-04031: unable to allocate 768 bytes of shared memory ("shared
Error ignored: ORA-04031: unable to allocate 64 bytes of shared memory ("shared pool","declare
Error ignored: ORA-00900: invalid SQL statement
Error ignored: ORA-04031: unable to allocate 64 bytes of shared memory ("shared pool","declare
Error ignored: ORA-00900: invalid SQL statement
Error ignored: ORA-04031: unable to allocate 64 bytes of shared memory ("shared pool","declare
Error ignored: ORA-00900: invalid SQL statement
Error ignored: ORA-29532: Java call terminated by uncaught Java exception:

DBUA completed with errors in CATPROC and Spatial. We ran the statements which failed due to low shared pool after increasing shared pool manually. We also ran @?/rdbms/admin/catproc.sql. After this even CATALOG became INVALID. We re-ran DBUA and it corrected the catalog, catproc and spatial components. This is the first time, we experienced that DBUA could actually be run twice in case of errors and it correctly fixes those errors in the second time.

The shared pool size should be 900M in case you are using 24 as degree of parallelism and 600M if you are using 12 as degree of parallelism.

Procedures to validate Oracle Text, Intermedia, Spatial, Data Mining

SQL> select object_name from dba_objects
2 where object_name like 'VALIDATE%';

OBJECT_NAME
--------------------------------------------------------------------------------
VALIDATE_CONTEXT
VALIDATE_ODM
VALIDATE_ORDIM
VALIDATE_SDO
VALIDATE_ORDIM_WITH_DETAILS

You can execute these procedures to validate the components:

Procedure Name Component
VALIDATE_CONTEXT Oracle Text
VALIDATE_ODM Oracle Data Mining
VALIDATE_ORDIM Oracle Intermedia
VALIDATE_SDO Oracle Spatial
VALIDATE_ORDIM_WITH_DETAILS Oracle Intermedia

Tuesday, December 4, 2007

Undecipherable strings in pl/sql during Oracle DB creation

If you have ever watched an Oracle DB getting created, you might have seen many screens like this one:

CREATE OR REPLACE PACKAGE dbms_repcat_sna_utl wrapped
2 a000000
3 1
4 abcd
5 abcd
6 abcd
7 abcd
8 abcd
9 abcd
10 abcd
11 abcd
12 abcd
13 abcd
14 abcd
15 abcd
16 abcd
17 abcd
18 abcd
19 9
20 41fe b06
21 mbt5sPmynQOp/DlAlZbh0ZEW7uEwg9dxDNBdGy//MpLquAVBFqPpremIQ2cFtM1fshzdAOtJ
22 oEJo8RaXG7UkcEuy8Cyp2rdU7ezq6sx3ToxNGW/Jckuij8EsqvhW+eRD0E8ic2witfmh5HOx
23 ZKbCavumTsC81XtuCBhwaWbRuNein0DShVd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HW9kOAco/clBuQA15HHwMlvsZ9efzLdEJ1hkLF++LDkCTRc7gZn2FzR3JzP4MJ+xULsc
53 G/ZPrefJwnOzB6Am+WqK8NtHxumFR0sS5fKFTHVXjLv0WeRerpc16Uz3UcQqhkbCm0du/+Vx
54 XsB2CugV5qE87sUecwQa3DrWUB10HtyWpFHqgJI4+n1q8NYAwfXz324XfxOWWabbZce4iofJ
55 y4OQBYs5XQ0sW/m5XFjWB/5l/QXomj87NMKNHELlzMottc7i2CRCnPl7R99CAcs7Ls50spra
56 9UK7UIvthE/+y/AZVZAZ2qAjHxLt81ZAEyAb0bnXgTi8gSSJtK9s+SREPApkPlm5k3sZ76X+
57 2xCFlHJwu1VrnXi5/jlzGeOa/TsShCpW3AVKbeyPCVp4PLH5y8VYPFWjnwTW/YUl0PDx6xVr
58 Uvlf24fVQZOkqoIi9qiaxXPWvi0aPGd5Vt41EUCi+wp7M//bQjQiiBLNWJ4p3PS9j2GNCyKB
59 VHel5k2Suyi49DOV+OJwDyxTYFe/9VHo19qHJBAIKDejStA=
60
61 /

Package created.

Notice that all such packages would have the keyword WRAPPED in their CREATE statement.

Oracle hides (obfuscates) its PL/SQL source code. Traditionally this has been done using the WRAP utility, but Oracle 10g Release 2 also allows this to be done dynamically using the DBMS_DDL package. This article in ORACLE_BASE presents examples of both methods of PL/SQL source obfuscation.

Monday, December 3, 2007

noexec_user_stack, Solaris and Oracle 10g

Metalink Note 395334.1 explains Why do we need to set NOEXEC_USER_STACK to 1 before Oracle installation as a mandatory step:

Sometimes programs allocate buffers but do not always check the size of the data coming into these buffers. An unwanted program can overflow such a buffer by placing a pointer to its own code and take control of the application with the privileges assigned to that application. Solaris 9 introduced the option to disable execution of user programs on the stack and assist in preventing this type of issue. This feature is only available on SPARC and AMD64 systems because it requires hardware support that is not available in current Intel 32bit CPUs. The protection is setup by employing the system wide parameter 'set noexec_user_stack=1' in the /etc/system file.

I got additional information from Solaris manuals:

A number of security bugs are related to default executable stacks when permissions are set to read, write, and execute. Although the SPARC and Intel application binary interface (ABI) mandates that stacks have execute permissions, most programs can function correctly without using executable stacks.

The Solaris 2.6 release provides a noexec_user_stack variable, which enables you to specify whether stack mappings are executable or not. By default, the value for the variable is zero, which provides ABI-compliant behavior. If the variable is set to non-zero, the system marks the stack of every process in the system as readable and writable but not executable.

Disabling Programs from Using Executable StacksUse the following steps to disable programs from using executable stacks:
1. Become superuser.
2. Add the line set noexec_user_stack=1 to the /etc/system file.
3. Type init 6 to reboot the system.

When the variable is set to a non-zero value, programs that execute code on their stack are sent a SIGSEGV signal, which usually terminates the program with a core dump. Such programs also generate a warning message, which includes the name of the program, the PID, and the UID of the user who ran the program, as shown in the following example:
a.out[347] attempt to execute code on stack by uid 555

The message is logged by the syslogd(1M) daemon when the syslog kern facility is set to notice level. This logging is set by default in the syslog.conf file, which means that the message is sent to both the console and to the /var/adm/messages file.

When you have set the noexec_user_stack variable, you can monitor these messages to observe potential security problems. You can also monitor the messages to identify valid programs that depend on executable stacks and have been prevented from correct operation. You can explicitly mark program stacks as executable by using the mprotect function.

Because of hardware limitations, executable stack problems can be caught and reported only on sun4m, sun4d, and sun4u platforms.

Developers sometimes allocate buffers in applications but do not always check the size of the data coming into these buffers. An attacker can overflow such a buffer and by placing a pointer to a piece of code under the attacker's control can take control of the application with the privileges assigned to that application. Buffer overflow exploits are most common on the stack and not very common on the heap (since heap memory allocation is different and hence harder to exploit). Solaris 9 introduced the option to disable execution of user programs on stack and assist in lowering the likely hood of exploit from stack based buffer overflows, this feature is only available on SPARC and AMD64 systems because it requires hardware support that is not available in current Intel 32bit CPUs. This can be done by employing a system wide parameter for example. Introducing the line 'set noexec_user_stack=1' in the /etc/system file. Another option is to have the application's stack be defined non-executable using the new mapfile segment descriptor.

The ability to prevent stack buffer overflow exploits along with Process Rights Management introduced in Solaris 10 provides a powerful mechanism to strengthen the security environment for applications. It relieves the IT administrator from the burden of worrying whether an application on one of the systems can compromise the rest of the system and the network due to buffer overflow exploits. It provides the IT administrator with a global switch to disallow even poorly written applications to be susceptible to stack buffer overflow attacks.

The Process Rights Management feature combined with the noexec_user_stack switch introduced in Solaris 7, provides some of the most powerful mechanisms of preventing and limiting the damage caused by hackers when they exploit application vulnerabilities. It is important to note that N1 Grid Containers have lower maximum privilege sets and for example, don't have access to devices.

Sunday, December 2, 2007

Some Responsibilities do not launch forms interface from Self Service

After applying ATG RUP4 on an instance, some responsibilities do not launch forms from Self Service. However everything works fine if you go through the direct URL containing f60cgi/dev60cgi. On closer inspection, it was found that only those responsibilities did not launch which had brackets ( ) in their name, For example Payables Administrator (Head Office). This is due to the fact that the context variable s_f60blockurlchar contains brackets. As a result, ATG blocks any responsibility which contains brackets ( ).

This is a known issue and is described in unpublished Metalink Note 413561.1:

Symptoms
Some forms don't start if executed from SSWA from some custom responsibilities, for instance:

SEC - VIE - Personnel Administrator (incl. Element entry)
KOS - PRI - Personnel Administrator (incl. Element entry)
SRM - BLG - Personnel Administrator (incl. Element entry)

The forms are correctly launched if you change the responsibility (inside classic Navigator / Forms)

Changes
Installation of 11i.ATG_PF.H RUP4 (as part of CPUOct2006)

Cause
The url generated contains brackets in the responsibility parameter (for instance gv3=KOS_PRI_PERS%20(EL)
and FORMS60_BLOCK_URL_CHARACTERS variable exludes brackets.

Customer has this error from Firefox browser when trying to use any of these responsibilities because the responsibility name has brackets in it, for instance "KOS - PRI - Personnel Administrator (incl. Element entry)" :

Oracle Forms Web CGI: Error detected
Your request cannot be serviced at this time due to the following error:
ERROR: URL Contains One or More Restricted Characters
http:// ...

FORMS60_BLOCK_URL_CHARACTERS value is :

%0a,%0d,!,%21,",%22,(,%28,),%29,;,[,%5b,],%5d,{,%7b,|,%7c,},%7d,%7f,>,%3c,<,%3e thus do not allow bracket characters ()

Solution
To implement the solution, please execute the following steps: Use OAM or Editcontext to update s_f60blockurlchar in context xml file i.e. to change: from: %0a,%0d,!,%21,",%22,(,%28,),%29,;,[,%5b,],%5d,{,%7b,|
,%7c,},%7d,%7f,>,%3c,<,%3e


to:

%0a,%0d,!,%21,",%22,%28,%29,;,[,%5b,],%5d,{,%7b,|
,%7c,},%7d,%7f,>,%3c,<,%3e


i.e. remove the bracket characters (, ) .

then run Autoconfig and retest.

I found Metalink Note 732586.1 which informs us that this is changed in the file

$IAS_CONFIG_HOME/Apache/Apache/conf. So, if you don't want to run autoconfig, you can manually search for FORMS60_BLOCK_URL_CHARACTERS in this file and change it also.