GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ut_coverage_html_reporter fails with ORA-28817 in FIPS-enabled databases due to MD5 usage in DBMS_CRYPTO · Issue #1316 · utPLSQL/utPLSQL

ut_coverage_html_reporter fails with ORA-28817 in FIPS-enabled databases due to MD5 usage in DBMS_CRYPTO #1316

New issue
Copy link
New issue
Copy link
Closed
#1356
Closed
ut_coverage_html_reporter fails with ORA-28817 in FIPS-enabled databases due to MD5 usage in DBMS_CRYPTO#1316
#1356
Copy link
Assignees
jgebal
Labels
bug

Description

@t1dsoldier
t1dsoldier
opened on Apr 10, 2026
Issue body actions

Describe the bug
When running the ut_coverage_html_reporter on an Oracle database 19.30 cdb/pdb with FIPS 140-2 mode enabled, the reporter fails with ORA-28817. The root cause is that ut_coverage_report_html_helper.object_id() uses DBMS_CRYPTO.HASH_MD5 to generate HTML element IDs for the coverage report. MD5 is not a FIPS-compliant algorithm and Oracle's FIPS library rejects the call entirely, causing the HTML reporter to fail. All other coverage reporters (Cobertura, Sonar, Coveralls) are unaffected as they do not go through this code path.


Provide version info
19.0.0.0.0
19.0.0

select substr(ut.version(),1,60) as ut_version from dual;
ut_version

v3.1.14.4197

select * from v$version;
19.30 enterprise edition

select * from nls_session_parameters;
PARAMETER VALUE


NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE

select substr(dbms_utility.port_string,1,60) as port_string from dual;
x86_64/Linux 2.4.xx

utPLSQL version: 3.1.14
Database: Oracle (FIPS 140-2 enabled via DBFIPS_140=TRUE)


Information about client software
Reproduced via both TOAD, utPLSQL-CLI 3.1.9 local and utPLSQL-CLI 3.1.9 CI build. Error is consistent regardless of client the failure occurs inside the database package itself.

To Reproduce

  1. Install utPLSQL 3.1.14 on an Oracle database with FIPS 140-2 mode enabled
  2. Create a test suite with at least one unit test
  3. Run tests with the HTML coverage reporter:

begin
ut.run('fun_schema.cool_test_suite', ut_coverage_html_reporter());
end;
/

  1. ORA-28817 is raised

Expected behavior
The HTML coverage report should generate successfully. FIPS-enabled databases are a valid and common Oracle configuration, particularly in government and regulated industries. The reporter should use a FIPS-compliant hashing algorithm.

Example code
The offending code is in ut_coverage_report_html_helper package body:

-- Current code (line ~93) - MD5 is not FIPS compliant
function object_id(a_object_full_name varchar2) return varchar2 is
begin
return rawtohex(dbms_crypto.hash(src => utl_raw.cast_to_raw(a_object_full_name), typ => dbms_crypto.hash_md5));
end;


Full error stack:

ORA-28817: PL/SQL function returned an error.
ORA-06512: at "UTPLSQL.UT_RUNNER", line 151
ORA-06512: at "SYS.DBMS_CRYPTO_FFI", line 131
ORA-06512: at "SYS.DBMS_CRYPTO", line 72
ORA-06512: at "UTPLSQL.UT_COVERAGE_REPORT_HTML_HELPER", line 93
ORA-06512: at "UTPLSQL.UT_COVERAGE_REPORT_HTML_HELPER", line 234
ORA-06512: at "UTPLSQL.UT_COVERAGE_REPORT_HTML_HELPER", line 329
ORA-06512: at "UTPLSQL.UT_COVERAGE_HTML_REPORTER", line 37
ORA-06512: at "UTPLSQL.UT_REPORTER_BASE", line 193
ORA-06512: at "UTPLSQL.UT_EVENT_MANAGER", line 70
ORA-06512: at "UTPLSQL.UT_EVENT_MANAGER", line 80
ORA-06512: at "UTPLSQL.UT_RUN", line 66
ORA-06512: at "UTPLSQL.UT_SUITE_ITEM", line 50
ORA-06512: at "UTPLSQL.UT_RUNNER", line 144
ORA-06512: at line 29


Proposed fix
Two changes are required in ut_coverage_report_html_helper package body:

  1. Swap hash_md5 for hash_sh256 in the object_id() function (FIPS-compliant, drop-in replacement):

function object_id(a_object_full_name varchar2) return varchar2 is
begin
return rawtohex(dbms_crypto.hash(src => utl_raw.cast_to_raw(a_object_full_name), typ => dbms_crypto.hash_sh256));
end;

  1. In the file_list() function, increase the l_id variable size from VARCHAR2(50) to VARCHAR2(64) to accommodate SHA-256's longer hex output (64 chars vs MD5's 32):

-- Before
l_id varchar2(50) := object_id(a_title);

-- After
l_id varchar2(100) := object_id(a_title);

Both changes were tested and confirmed to resolve the error with the HTML coverage reporter functioning correctly on a FIPS-enabled Oracle database.


Additional context
All other utPLSQL coverage reporters (ut_coverage_cobertura_reporter, ut_coverage_sonar_reporter, ut_coveralls_reporter) work correctly in FIPS mode as they do not use DBMS_CRYPTO. Only the HTML reporter is affected. Note that Oracle has deprecated MD5 starting from Oracle Database 21c, so this fix also future-proofs the reporter against environments where MD5 may be removed entirely.

Activity

  1. jgebal
    added
    bug
    on May 9, 2026
  2. jgebal
    self-assigned this
    on May 23, 2026
  3. jgebal commented on May 23, 2026

    @jgebal
    jgebal
    on May 23, 2026
    Member
    More actions

    @t1dsoldier
    If I would be to test this locally on 19c EE or on 21/23 free, which DB initialization parameters should I set at minimum?

  4. jgebal commented on May 23, 2026

    @jgebal
    jgebal
    on May 23, 2026
    Member
    More actions

    @t1dsoldier If I would be to test this locally on 19c EE or on 21/23 free, which DB initialization parameters should I set at minimum?

    I have found a way to enable it in 23.26 free
    So I can reproduce it.
    After fix is merged in develop it will work fine.

  5. jgebal
    closed this as completedin #1356on May 23, 2026
  6. t1dsoldier commented on Jun 4, 2026

    @t1dsoldier
    t1dsoldier
    on Jun 4, 2026 via email
    Author
    More actions
    Apologies i hadn't checked my email in a little. Glad you were able to reproduce. David Humphrey Systems Engineer Comp-TIA A+, Network+, Security+ Certified, OCP 19c http://www.linkedin.com/in/davidhumphrey2
    …
    On Sat, May 23, 2026, 5:36 PM Jacek Gębal ***@***.***> wrote: *jgebal* left a comment (utPLSQL/utPLSQL#1316) <#1316 (comment)> @t1dsoldier <https://github.com/t1dsoldier> If I would be to test this locally on 19c EE or on 21/23 free, which DB initialization parameters should I set at minimum? I have found a way to enable it in 23.26 free So I can reproduce it <https://github.com/utPLSQL/utPLSQL/actions/runs/26343947377/job/77550647338#step:25:1453> . After fix is merged in develop it will work fine. — Reply to this email directly, view it on GitHub <#1316 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/BLBYPKOK6KMFMXSGUUGNWAT44IKXLAVCNFSM6AAAAACXUJ3RTWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DKMRWGU4DONZZGM> . Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>. You are receiving this because you were mentioned.Message ID: ***@***.***>
  7. jgebal commented on Jun 4, 2026

    @jgebal
    jgebal
    on Jun 4, 2026
    Member
    More actions

    Apologies i hadn't checked my email in a little. Glad you were able to
    reproduce.

    David Humphrey
    Systems Engineer
    Comp-TIA A+, Network+, Security+ Certified, OCP 19c
    http://www.linkedin.com/in/davidhumphrey2
    …

    @t1dsoldier
    The new version 3.2.2 of utPLSQL contains the fix for it already.
    https://github.com/orgs/utPLSQL/discussions/3

  8. stephen-cloete
    added a commit that references this issue on Aug 21, 2026

    Changed usage of MD5 to SHA256

    This issue will close once commit 9badaa4 is merged into the 'develop' branch.
    9badaa4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @jgebal
    jgebal

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.