1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00
Commit Graph

14 Commits

Author SHA1 Message Date
Oleksandr Byelkin
0d59c434fa Merge branch '10.6' into 10.11 2026-06-21 15:32:20 +02:00
Sergei Golubchik
52bbe5b6e7 MDEV-39658 ASAN crash on invalid proxy_protocol_networks value
max_subnet estimate was off by one.

* only allow address with a known family
  (trips an assert in addr_matches_subnet())
* adjust max_subnet estimate accordinly
2026-05-20 22:49:20 +02:00
Sergei Golubchik
05663d1910 MDEV-39576 PROXY v2 protocol uninitialized memory reads 2026-05-20 22:49:20 +02:00
Sergei Golubchik
31319c7bc6 proxy protocol v2: fix a harmless typo
according to the rfc, the length is 2 bytes,
but the max length is 226 and there's a validity
check for length <= 240.
2026-05-20 22:49:20 +02:00
Sergei Golubchik
c5409caab0 MDEV-39564 One-byte OOB write in PROXY protocol v1 header parser 2026-05-20 22:49:20 +02:00
Vladislav Vaintroub
88a9b14f9f MDEV-39466 fix off-by-one stack buffer overflow in PROXY v1 header parsing
Make sure null terminator byte that is added at the end of header
is within boundaries of 'hdr' array.

This patch is based on https://github.com/MariaDB/server/pull/4881
by Uwez Khan
2026-04-28 21:10:46 +02:00
Sergei Golubchik
7c58e97bf6 perfschema memory related instrumentation changes 2020-03-10 19:24:22 +01:00
Vladislav Vaintroub
584ffa02f1 MDEV-19669 - fix matching CIDR address for proxy protocol.
Prior to this fix, when matching addresses using mask,
extra bits could be used for  comparison, e.g to
match with "a.b.c.d/24" , 27 bits were compared rather than 24.

The patch fixes the calculation.
2019-11-27 20:50:06 +01:00
Vladislav Vaintroub
131ed6c273 MDEV-15743 Avoid a PFS warning by shortening key name for proxy protocol rwlock 2018-04-02 22:49:32 +02:00
Vladislav Vaintroub
96ecf3ff23 MDEV-15501 : Make proxy_protocol_networks variable read-write. 2018-03-23 20:23:12 +00:00
Vladislav Vaintroub
6c279ad6a7 MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from 'size_t' to 'type', possible loss of data)
Handle string length as size_t, consistently (almost always:))
Change function prototypes to accept size_t, where in the past
ulong or uint were used. change local/member variables to size_t
when appropriate.

This fix excludes rocksdb, spider,spider, sphinx and connect for now.
2018-02-06 12:55:58 +00:00
Monty
a7e352b54d Changed database, tablename and alias to be LEX_CSTRING
This was done in, among other things:
- thd->db and thd->db_length
- TABLE_LIST tablename, db, alias and schema_name
- Audit plugin database name
- lex->db
- All db and table names in Alter_table_ctx
- st_select_lex db

Other things:
- Changed a lot of functions to take const LEX_CSTRING* as argument
  for db, table_name and alias. See init_one_table() as an example.
- Changed some function arguments from LEX_CSTRING to const LEX_CSTRING
- Changed some lists from LEX_STRING to LEX_CSTRING
- threads_mysql.result changed because process list_db wasn't always
  correctly updated
- New append_identifier() function that takes LEX_CSTRING* as arguments
- Added new element tmp_buff to Alter_table_ctx to separate temp name
  handling from temporary space
- Ensure we store the length after my_casedn_str() of table/db names
- Removed not used version of rename_table_in_stat_tables()
- Changed Natural_join_column::table_name and db_name() to never return
  NULL (used for print)
- thd->get_db() now returns db as a printable string (thd->db.str or "")
2018-01-30 21:33:55 +02:00
Vladislav Vaintroub
aaddac5cd7 fix compile errors 2017-08-23 08:27:46 +00:00
Vladislav Vaintroub
58cd69fc80 MDEV-11159 Server proxy protocol support
accept proxy protocol header from client connections.
The new server variable 'proxy_protocol_networks' contains list
of networks from which proxy header is accepted.
2017-08-22 21:08:38 +02:00