func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
doquery( int opcode, associd_t associd, int auth, int qsize, const char *qdata, u_short *rstatus, int *rsize, const char **rdata ) { return doqueryex(opcode, associd, auth, qsize, qdata, rstatus, rsize, rdata, FALSE); }
0
[ "CWE-20" ]
ntp
07a5b8141e354a998a52994c3c9cd547927e56ce
116,338,152,336,407,720,000,000,000,000,000,000,000
14
[TALOS-CAN-0063] avoid buffer overrun in ntpq
static void error_set(json_error_t *error, const lex_t *lex, const char *msg, ...) { va_list ap; char msg_text[JSON_ERROR_TEXT_LENGTH]; char msg_with_context[JSON_ERROR_TEXT_LENGTH]; int line = -1, col = -1; size_t pos = 0; const char *result = msg_text; if(!error) ...
0
[ "CWE-20" ]
jansson
64ce0ad3731ebd77e02897b07920eadd0e2cc318
66,727,233,225,831,320,000,000,000,000,000,000,000
53
Fix for issue #282 The fix limits recursion depths when parsing arrays and objects. The limit is configurable via the `JSON_PARSER_MAX_DEPTH` setting within `jansson_config.h` and is set by default to 2048. Update the RFC conformance document to note the limit; the RFC allows limits to be set by the implementation so...
rfbProcessClientInitMessage(rfbClientPtr cl) { rfbClientInitMsg ci; char buf[256]; rfbServerInitMsg *si = (rfbServerInitMsg *)buf; int len, n; rfbClientIteratorPtr iterator; rfbClientPtr otherCl; if ((n = ReadExact(cl, (char *)&ci,sz_rfbClientInitMsg)) <= 0) { if (n == 0) ...
0
[ "CWE-119" ]
vino
dff52694a384fe95195f2211254026b752d63ec4
284,507,957,892,488,030,000,000,000,000,000,000,000
66
Avoid out-of-bounds memory accesses This fixes two critical security vulnerabilities that lead to an out-of-bounds memory access with a crafted client framebuffer update request packet. The dimensions of the update from the packet are checked to ensure that they are within the screen dimensions. Thanks to Kevin Chen ...
std::basic_string<Char> to_string() const { return std::basic_string<Char>(data_, size_); }
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
239,505,467,450,060,500,000,000,000,000,000,000,000
3
Fix segfault on complex pointer formatting (#642)
soup_ntlm_parse_challenge (const char *challenge, char **nonce, char **default_domain, gboolean *ntlmv2_session, gboolean *negotiate_target, char **target_info, size_t *target_info_sz) { gsize clen; NTLMString domain; NTLMString target; guchar *chall; guint32 flag...
1
[ "CWE-125" ]
libsoup
f8a54ac85eec2008c85393f331cdd251af8266ad
321,042,732,314,331,060,000,000,000,000,000,000,000
63
NTLM: Avoid a potential heap buffer overflow in v2 authentication Check the length of the decoded v2 challenge before attempting to parse it, to avoid reading past it. Fixes #173
explicit HandshakeErrorCallback(HandshakeCallback* hcb) : SSLServerAcceptCallbackBase(hcb) {}
0
[ "CWE-125" ]
folly
c321eb588909646c15aefde035fd3133ba32cdee
36,533,098,698,117,510,000,000,000,000,000,000,000
2
Handle close_notify as standard writeErr in AsyncSSLSocket. Summary: Fixes CVE-2019-11934 Reviewed By: mingtaoy Differential Revision: D18020613 fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836
void dimm_box_del(GF_Box *s) { gf_free((GF_DIMMBox *)s); }
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
175,574,529,321,446,870,000,000,000,000,000,000,000
4
fixed #1587
static int sig_check_splits(void) { GSList *tmp; int stop; stop = TRUE; for (tmp = servers; tmp != NULL; tmp = tmp->next) { IRC_SERVER_REC *rec = tmp->data; if (!IS_IRC_SERVER(rec)) continue; if (rec->split_servers != NULL) { if (!check_server_splits(rec)) stop = FALSE; } } if (stop) { g_s...
0
[ "CWE-416" ]
irssi
a6cae91cecba2e8cf11ed779c5da5a229472575c
310,377,942,678,650,570,000,000,000,000,000,000,000
25
Merge pull request #812 from ailin-nemui/tape-netsplit revert netsplit print optimisation (cherry picked from commit 7de1378dab8081932d9096e19ae3d0921e560230)
void CoreAuthHandler::onReadyRead() { if (socket()->bytesAvailable() < 4) return; // once we have selected a peer, we certainly don't want to read more data! if (_peer) return; if (!_magicReceived) { quint32 magic; socket()->peek((char*)&magic, 4); magic = qFrom...
1
[]
quassel
e67887343c433cc35bc26ad6a9392588f427e746
277,968,228,096,908,780,000,000,000,000,000,000,000
71
Handle invalid handshake data properly in the core Clients sending invalid handshake data could make the core crash due to an unchecked pointer. This commit fixes this issue by having the core close the socket if a peer could not be created. Thanks to Bas Pape (Tucos) for finding this one!
static void b43_upload_card_macaddress(struct b43_wldev *dev) { b43_write_mac_bssid_templates(dev); b43_macfilter_set(dev, B43_MACFILTER_SELF, dev->wl->mac_addr); }
0
[ "CWE-134" ]
wireless
9538cbaab6e8b8046039b4b2eb6c9d614dc782bd
279,400,222,332,832,450,000,000,000,000,000,000,000
5
b43: stop format string leaking into error msgs The module parameter "fwpostfix" is userspace controllable, unfiltered, and is used to define the firmware filename. b43_do_request_fw() populates ctx->errors[] on error, containing the firmware filename. b43err() parses its arguments as a format string. For systems with...
static void signal_handler(int signum) { char cmd[1024]; if (!crash_handler_cmd) { return; } snprintf (cmd, sizeof(cmd) - 1, crash_handler_cmd, getpid ()); r_sys_backtrace (); exit (r_sys_cmd (cmd)); }
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
156,603,931,691,630,010,000,000,000,000,000,000,000
9
Fix command injection on PDB download (#16966) * Fix r_sys_mkdirp with absolute path on Windows * Fix build with --with-openssl * Use RBuffer in r_socket_http_answer() * r_socket_http_answer: Fix read for big responses * Implement r_str_escape_sh() * Cleanup r_socket_connect() on Windows * Fix socket being creat...
tls_server_start(uschar *require_ciphers, uschar *require_mac, uschar *require_kx, uschar *require_proto) { int rc; uschar *expciphers; /* Check for previous activation */ if (tls_active >= 0) { tls_error(US"STARTTLS received after TLS started", NULL, US""); smtp_printf("554 Already in TLS\r\n"); return FAI...
1
[]
exim
7be682ca5ebd9571a01b762195b11c34cd231830
189,045,222,551,162,040,000,000,000,000,000,000,000
137
TLS SNI support for OpenSSL ($tls_sni)
unsigned char *kssl_skip_confound(krb5_enctype etype, unsigned char *a) { int i, conlen; size_t cklen; static size_t *cksumlens = NULL; unsigned char *test_auth; conlen = (etype)? 8: 0; if (!cksumlens && !(cksumlens = populate_cksumlens())) return NULL; for (i=0; (cklen = cksumlens[i]) != 0; i++) { ...
0
[ "CWE-20" ]
openssl
cca1cd9a3447dd067503e4a85ebd1679ee78a48e
53,532,766,977,809,720,000,000,000,000,000,000,000
18
Submitted by: Tomas Hoger <thoger@redhat.com> Fix for CVE-2010-0433 where some kerberos enabled versions of OpenSSL could be crashed if the relevant tables were not present (e.g. chrooted).
map_cipher_gcry_to_openpgp (enum gcry_cipher_algos algo) { switch (algo) { case GCRY_CIPHER_NONE: return CIPHER_ALGO_NONE; case GCRY_CIPHER_IDEA: return CIPHER_ALGO_IDEA; case GCRY_CIPHER_3DES: return CIPHER_ALGO_3DES; case GCRY_CIPHER_CAST5: return CIPHER_ALGO_CAST5; ...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
228,363,393,406,691,740,000,000,000,000,000,000,000
19
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
CImg<T>& load_magick(const char *const filename) { if (!filename) throw CImgArgumentException(_cimg_instance "load_magick(): Specified filename is (null).", cimg_instance); #ifdef cimg_use_magick Magick::Image image(filenam...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
182,223,342,014,509,740,000,000,000,000,000,000,000
64
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
nwfilterConnectListNWFilters(virConnectPtr conn, char **const names, int maxnames) { int nnames; if (virConnectListNWFiltersEnsureACL(conn) < 0) return -1; nwfilterDriverLock(); nnames = virNWFilterObjListGetNames(driver->nwfilters, con...
0
[ "CWE-667" ]
libvirt
a4947e8f63c3e6b7b067b444f3d6cf674c0d7f36
119,712,654,898,358,350,000,000,000,000,000,000,000
16
nwfilter: fix crash when counting number of network filters The virNWFilterObjListNumOfNWFilters method iterates over the driver->nwfilters, accessing virNWFilterObj instances. As such it needs to be protected against concurrent modification of the driver->nwfilters object. This API allows unprivileged users to conne...
void pg_update_epoch(spg_t pgid, epoch_t epoch) { Mutex::Locker l(pg_epoch_lock); map<spg_t,epoch_t>::iterator t = pg_epoch.find(pgid); assert(t != pg_epoch.end()); pg_epochs.erase(pg_epochs.find(t->second)); t->second = epoch; pg_epochs.insert(epoch); }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
295,417,402,913,044,260,000,000,000,000,000,000,000
8
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
static int rfcomm_sock_listen(struct socket *sock, int backlog) { struct sock *sk = sock->sk; int err = 0; BT_DBG("sk %p backlog %d", sk, backlog); lock_sock(sk); if (sk->sk_state != BT_BOUND) { err = -EBADFD; goto done; } if (sk->sk_type != SOCK_STREAM) { err = -EINVAL; goto done; } if (!rfcomm_p...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
154,267,238,045,165,050,000,000,000,000,000,000,000
48
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
redisClient *createClient(int fd) { redisClient *c = zmalloc(sizeof(redisClient)); c->bufpos = 0; anetNonBlock(NULL,fd); anetTcpNoDelay(NULL,fd); if (!c) return NULL; if (aeCreateFileEvent(server.el,fd,AE_READABLE, readQueryFromClient, c) == AE_ERR) { close(fd); zfre...
0
[ "CWE-20" ]
redis
697af434fbeb2e3ba2ba9687cd283ed1a2734fa5
47,990,803,860,060,860,000,000,000,000,000,000,000
46
initial changes needed to turn the current VM code into a cache system. Tons of work to do still.
static void pl022_reset(PL022State *s) { s->rx_fifo_len = 0; s->tx_fifo_len = 0; s->im = 0; s->is = PL022_INT_TX; s->sr = PL022_SR_TFE | PL022_SR_TNF; }
0
[ "CWE-119" ]
qemu
d8d0a0bc7e194300e53a346d25fe5724fd588387
241,399,572,083,605,300,000,000,000,000,000,000,000
8
pl022: fix buffer overun on invalid state load CVE-2013-4530 pl022.c did not bounds check tx_fifo_head and rx_fifo_head after loading them from file and before they are used to dereference array. Reported-by: Michael S. Tsirkin <mst@redhat.com Reported-by: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: Micha...
TEST(BitTestMatchExpression, MatchesNegativeIntegerWithBitMask) { long long bitMaskSet = 10; long long bitMaskClear = 5; BSONObj match1 = fromjson("{a: NumberInt(-54)}"); BSONObj match2 = fromjson("{a: NumberLong(-54)}"); BSONObj match3 = fromjson("{a: -54.0}"); BitsAllSetMatchExpression balls...
0
[]
mongo
b0ef26c639112b50648a02d969298650fbd402a4
229,329,644,071,239,750,000,000,000,000,000,000,000
30
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
CURLcode Curl_parse_login_details(const char *login, const size_t len, char **userp, char **passwdp, char **optionsp) { CURLcode result = CURLE_OK; char *ubuf = NULL; char *pbuf = NULL; char *obuf = NULL; const char *psep = NULL; const char...
0
[ "CWE-119" ]
curl
9b5e12a5491d2e6b68e0c88ca56f3a9ef9fba400
62,848,385,803,274,600,000,000,000,000,000,000,000
97
url: fix alignment of ssl_backend_data struct - Align the array of ssl_backend_data on a max 32 byte boundary. 8 is likely to be ok but I went with 32 for posterity should one of the ssl_backend_data structs change to contain a larger sized variable in the future. Prior to this change (since dev 70f1db3, release 7.5...
TEST_F(NgramKernelTest, TestUnpaddedTrigramsWithEmptySequence) { MakeOp("|", {3}, "", "", 0, false); // Batch items are: // 0: "a", "b", "c", "d" // 1: "e", "f" AddInputFromArray<tstring>(TensorShape({6}), {"a", "b", "c", "d", "e", "f"}); AddInputFromArray<int64>(TensorShape({4}), {0, 4, 4, 6}); TF_ASSERT...
0
[ "CWE-703", "CWE-787" ]
tensorflow
ba424dd8f16f7110eea526a8086f1a155f14f22b
83,954,891,289,048,200,000,000,000,000,000,000,000
15
Enhance validation of ngram op and handle case of 0 tokens. PiperOrigin-RevId: 369940178 Change-Id: Ia82f42c09d14efe76e7dc013505b832a42282f0b
static void _usb_writen_sync(struct rtl_priv *rtlpriv, u32 addr, void *data, u16 len) { struct device *dev = rtlpriv->io.dev; struct usb_device *udev = to_usb_device(dev); u8 request = REALTEK_USB_VENQT_CMD_REQ; u8 reqtype = REALTEK_USB_VENQT_WRITE; u16 wvalue; u16 index = REALTEK_USB_VENQT_CMD_IDX; int...
0
[ "CWE-400", "CWE-401" ]
linux
3f93616951138a598d930dcaec40f2bfd9ce43bb
132,531,657,953,341,320,000,000,000,000,000,000,000
21
rtlwifi: prevent memory leak in rtl_usb_probe In rtl_usb_probe if allocation for usb_data fails the allocated hw should be released. In addition the allocated rtlpriv->usb_data should be released on error handling path. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeau...
static int parse_function_starts(struct MACH0_(obj_t) * bin, ut64 off) { struct linkedit_data_command fc; ut8 sfc[sizeof(struct linkedit_data_command)] = { 0 }; int len; if (off > bin->size || off + sizeof(struct linkedit_data_command) > bin->size) { bprintf("Likely overflow while parsing" " LC_FUNCTION_START...
0
[ "CWE-787" ]
rizin
348b1447d1452f978b69631d6de5b08dd3bdf79d
107,853,344,943,960,630,000,000,000,000,000,000,000
47
fix #2956 - oob write in mach0.c
PHP_FUNCTION(imagecreatefromwbmp) { _php_image_create_from(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_WBM, "WBMP", gdImageCreateFromWBMP, gdImageCreateFromWBMPCtx); }
0
[ "CWE-703", "CWE-189" ]
php-src
2938329ce19cb8c4197dec146c3ec887c6f61d01
238,764,743,834,894,850,000,000,000,000,000,000,000
4
Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop()) And also fixed the bug: arguments are altered after some calls
buildBatch(instanceData *pData, uchar *message, uchar **tpls) { int length = strlen((char *)message); int r; uchar *searchIndex; uchar *searchType; uchar *parent; uchar *bulkId = NULL; DEFiRet; # define META_STRT "{\"index\":{\"_index\": \"" # define META_TYPE "\",\"_type\":\"" # define META_PARENT "\",\"_parent...
0
[ "CWE-399" ]
rsyslog
80f88242982c9c6ad6ce8628fc5b94ea74051cf4
247,444,167,128,863,160,000,000,000,000,000,000,000
42
bugfix: double-free in omelasticsearch closes: http://bugzilla.adiscon.com/show_bug.cgi?id=461 Thanks to Marius Ionescu for providing a detailled bug report
connection_is_free(Connection *conn, int use_lock) { int rc = 0; if (use_lock) { /* If the lock is held, someone owns this! */ if (pthread_mutex_trylock(&(conn->c_mutex)) != 0) { return 0; } } rc = conn->c_sd == SLAPD_INVALID_SOCKET && conn->c_refcnt == 0 && ...
0
[ "CWE-415" ]
389-ds-base
a3c298f8140d3e4fa1bd5a670f1bb965a21a9b7b
182,898,465,568,092,730,000,000,000,000,000,000,000
18
Issue 5218 - double-free of the virtual attribute context in persistent search (#5219) description: A search is processed by a worker using a private pblock. If the search is persistent, the worker spawn a thread and kind of duplicate its private pblock so that the spawn thread continue to process the p...
inline bool AveragePool(const PoolParams& params, const RuntimeShape& input_shape, const int16_t* input_data, const RuntimeShape& output_shape, int16_t* output_data) { TFLITE_DCHECK_LE(params.quantized_activation_min, ...
0
[ "CWE-703", "CWE-835" ]
tensorflow
dfa22b348b70bb89d6d6ec0ff53973bacb4f4695
272,170,351,763,849,260,000,000,000,000,000,000,000
60
Prevent a division by 0 in average ops. PiperOrigin-RevId: 385184660 Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3
notify_cancel(dns_zone_t *zone) { dns_notify_t *notify; /* * 'zone' locked by caller. */ REQUIRE(LOCKED_ZONE(zone)); for (notify = ISC_LIST_HEAD(zone->notifies); notify != NULL; notify = ISC_LIST_NEXT(notify, link)) { if (notify->find != NULL) dns_adb_cancelfind(notify->find); if (notify->...
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
231,054,296,600,413,800,000,000,000,000,000,000,000
18
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
evutil_getenv_(const char *varname) { if (evutil_issetugid()) return NULL; return getenv(varname); }
0
[ "CWE-119", "CWE-787" ]
libevent
329acc18a0768c21ba22522f01a5c7f46cacc4d5
88,552,934,053,846,550,000,000,000,000,000,000,000
7
evutil_parse_sockaddr_port(): fix buffer overflow @asn-the-goblin-slayer: "Length between '[' and ']' is cast to signed 32 bit integer on line 1815. Is the length is more than 2<<31 (INT_MAX), len will hold a negative value. Consequently, it will pass the check at line 1816. Segfault happens at line 1819. ...
[[noreturn]] void TProtocolException::throwBoolValueOutOfRange(uint8_t value) { throw TProtocolException( TProtocolException::INVALID_DATA, fmt::format( "Attempt to interpret value {} as bool, probably the data is " "corrupted", value)); }
0
[ "CWE-703", "CWE-770" ]
fbthrift
3f156207e8a6583d88999487e954320dc18955e6
7,258,938,884,912,604,000,000,000,000,000,000,000
8
Better handling of truncated data when reading containers Summary: Currently we read the container size and blindly pre-allocate the container of that size. This allows malicious attacker to send few bytes message and cause server to allocate GBs of memory. This diff changes the logic to check if we have at least 1b/...
sg_remove_sfp(struct kref *kref) { struct sg_fd *sfp = container_of(kref, struct sg_fd, f_ref); struct sg_device *sdp = sfp->parentdp; unsigned long iflags; write_lock_irqsave(&sdp->sfd_lock, iflags); list_del(&sfp->sfd_siblings); write_unlock_irqrestore(&sdp->sfd_lock, iflags); INIT_WORK(&sfp->ew.work, sg_rem...
0
[ "CWE-190", "CWE-189" ]
linux
fdc81f45e9f57858da6351836507fbcf1b7583ee
306,277,365,314,532,970,000,000,000,000,000,000,000
13
sg_start_req(): use import_iovec() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
int64 GetCufftWorkspaceLimit(const string& envvar_in_mb, int64 default_value_in_bytes) { const char* workspace_limit_in_mb_str = getenv(envvar_in_mb.c_str()); if (workspace_limit_in_mb_str != nullptr && strcmp(workspace_limit_in_mb_str, "") != 0) { int64 scratch_limit_in_mb = ...
0
[ "CWE-617", "CWE-703" ]
tensorflow
31bd5026304677faa8a0b77602c6154171b9aec1
132,793,229,462,189,440,000,000,000,000,000,000,000
17
Prevent check fail in FFT PiperOrigin-RevId: 372031044 Change-Id: I50994e3e8a5d1342d01bde80256f6bf2730ca299
_goLine(char *l) { if (l == NULL || *l == '\0' || Currentbuf->currentLine == NULL) { displayBuffer(Currentbuf, B_FORCE_REDRAW); return; } Currentbuf->pos = 0; if (((*l == '^') || (*l == '$')) && prec_num) { gotoRealLine(Currentbuf, prec_num); } else if (*l == '^') { Currentbuf->topLine = Cur...
0
[ "CWE-59", "CWE-241" ]
w3m
18dcbadf2771cdb0c18509b14e4e73505b242753
168,624,883,339,129,780,000,000,000,000,000,000,000
24
Make temporary directory safely when ~/.w3m is unwritable
void NumberFormatTest::Test13055_PercentageRounding() { IcuTestErrorCode status(*this, "PercentageRounding"); UnicodeString actual; LocalPointer<NumberFormat>pFormat(NumberFormat::createPercentInstance("en_US", status)); if (U_FAILURE(status)) { dataerrln("Failure creating DecimalFormat %s", u_errorName(s...
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
34,469,263,029,554,243,000,000,000,000,000,000,000
13
ICU-20246 Fixing another integer overflow in number parsing.
p11_proxy_module_check (CK_FUNCTION_LIST_PTR module) { State *state; bool ret = false; if (!p11_virtual_is_wrapper (module)) return false; p11_lock (); for (state = all_instances; state != NULL; state = state->next) if (state->wrapped == module) { ret = true; break; } p11_unlock (); return ret; }
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
106,368,268,185,902,220,000,000,000,000,000,000,000
18
Check for arithmetic overflows before allocating
void br_multicast_disable_port(struct net_bridge_port *port) { struct net_bridge *br = port->br; struct net_bridge_port_group *pg; struct hlist_node *p, *n; spin_lock(&br->multicast_lock); hlist_for_each_entry_safe(pg, p, n, &port->mglist, mglist) br_multicast_del_pg(br, pg); if (!hlist_unhashed(&port->rlist)...
0
[ "CWE-399" ]
linux
6b0d6a9b4296fa16a28d10d416db7a770fc03287
164,038,884,349,229,610,000,000,000,000,000,000,000
16
bridge: Fix mglist corruption that leads to memory corruption The list mp->mglist is used to indicate whether a multicast group is active on the bridge interface itself as opposed to one of the constituent interfaces in the bridge. Unfortunately the operation that adds the mp->mglist node to the list neglected to che...
static void fts3EvalTokenCosts( Fts3Cursor *pCsr, /* FTS Cursor handle */ Fts3Expr *pRoot, /* Root of current AND/NEAR cluster */ Fts3Expr *pExpr, /* Expression to consider */ Fts3TokenAndCost **ppTC, /* Write new entries to *(*ppTC)++ */ Fts3Expr ***ppOr, ...
0
[ "CWE-787" ]
sqlite
c72f2fb7feff582444b8ffdc6c900c69847ce8a9
332,504,481,072,935,040,000,000,000,000,000,000,000
42
More improvements to shadow table corruption detection in FTS3. FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d
methodHandle LinkResolver::linktime_resolve_interface_method_or_null( const LinkInfo& link_info) { EXCEPTION_MARK; methodHandle method_result = linktime_resolve_interface_method(link_info, THREAD); if (HAS_PENDING_EXCEPTION) { CLEAR_PENDING_EXCEPTION; retur...
0
[]
jdk11u
132745902a4601dc64b2c8ca112ca30292feccb4
25,816,496,675,375,004,000,000,000,000,000,000,000
11
8281866: Enhance MethodHandle invocations Reviewed-by: mbaesken Backport-of: d974d9da365f787f67971d88c79371c8b0769f75
static void vmx_set_apic_access_page_addr(struct kvm_vcpu *vcpu) { struct page *page; /* Defer reload until vmcs01 is the current VMCS. */ if (is_guest_mode(vcpu)) { to_vmx(vcpu)->nested.reload_vmcs01_apic_access_page = true; return; } if (!(secondary_exec_controls_get(to_vmx(vcpu)) & SECONDARY_EXEC_VIR...
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
263,834,804,935,305,800,000,000,000,000,000,000,000
27
KVM: VMX: Don't use vcpu->run->internal.ndata as an array index __vmx_handle_exit() uses vcpu->run->internal.ndata as an index for an array access. Since vcpu->run is (can be) mapped to a user address space with a writer permission, the 'ndata' could be updated by the user process at anytime (the user process can set...
parse_noargs_dec_ttl(struct ofpbuf *ofpacts) { struct ofpact_cnt_ids *ids; uint16_t id = 0; ofpact_put_DEC_TTL(ofpacts); ofpbuf_put(ofpacts, &id, sizeof id); ids = ofpacts->header; ids->n_controllers++; ofpact_finish_DEC_TTL(ofpacts, &ids); }
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
109,182,251,181,860,080,000,000,000,000,000,000,000
11
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
void DL_Dxf::addAttribute(DL_CreationInterface* creationInterface) { DL_AttributeData d( // insertion point getRealValue(10, 0.0), getRealValue(20, 0.0), getRealValue(30, 0.0), // alignment point getRealValue(11, 0.0), getRealValue(21, 0.0), getRealVal...
0
[ "CWE-191" ]
qcad
1eeffc5daf5a06cf6213ffc19e95923cdebb2eb8
177,882,901,394,742,100,000,000,000,000,000,000,000
31
check vertexIndex which might be -1 for broken DXF
gx_device_raster_plane(const gx_device * dev, const gx_render_plane_t *render_plane) { ulong bpc = (render_plane && render_plane->index >= 0 ? render_plane->depth : dev->color_info.depth/(dev->is_planar ? dev->color_info.num_components : 1)); ulong bits = (ulong) dev->width * bpc; int l2align; ...
0
[]
ghostpdl
79cccf641486a6595c43f1de1cd7ade696020a31
304,423,403,126,798,800,000,000,000,000,000,000,000
12
Bug 699654(2): preserve LockSafetyParams in the nulldevice The nulldevice does not necessarily use the normal setpagedevice machinery, but can be set using the nulldevice operator. In which case, we don't preserve the settings from the original device (in the way setpagedevice does). Since nulldevice does nothing, th...
TEST(IndexBoundsBuilderTest, TranslateGteNan) { auto testIndex = buildSimpleIndexEntry(); BSONObj obj = fromjson("{a: {$gte: NaN}}"); auto expr = parseMatchExpression(obj); BSONElement elt = obj.firstElement(); OrderedIntervalList oil; IndexBoundsBuilder::BoundsTightness tightness; IndexBoun...
0
[ "CWE-754" ]
mongo
f8f55e1825ee5c7bdb3208fc7c5b54321d172732
233,290,710,744,732,600,000,000,000,000,000,000,000
14
SERVER-44377 generate correct plan for indexed inequalities to null
static int asn1_template_noexp_d2i(ASN1_VALUE **val, const unsigned char **in, long len, const ASN1_TEMPLATE *tt, char opt, ASN1_TLC *ctx, int depth) { int flags, aclass; int ret; ASN1_VALUE *tval; c...
0
[ "CWE-400", "CWE-674", "CWE-787" ]
openssl
2ac4c6f7b2b2af20c0e2b0ba05367e454cd11b33
68,291,167,300,868,200,000,000,000,000,000,000,000
131
Limit ASN.1 constructed types recursive definition depth Constructed types with a recursive definition (such as can be found in PKCS7) could eventually exceed the stack given malicious input with excessive recursion. Therefore we limit the stack depth. CVE-2018-0739 Credit to OSSFuzz for finding this issue. Reviewe...
TEST(ModMatchExpression, ElemMatchKey) { ModMatchExpression mod("a", 5, 2); MatchDetails details; details.requestElemMatchKey(); ASSERT(!mod.matchesBSON(BSON("a" << 4), &details)); ASSERT(!details.hasElemMatchKey()); ASSERT(mod.matchesBSON(BSON("a" << 2), &details)); ASSERT(!details.hasElemM...
0
[]
mongo
64095239f41e9f3841d8be9088347db56d35c891
163,691,539,636,147,130,000,000,000,000,000,000,000
12
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
int samdb_ldb_val_case_cmp(const char *s, struct ldb_val *v) { size_t len = strlen(s); int ret; if (len > v->length) return 1; ret = strncasecmp(s, (const char *)v->data, v->length); if (ret != 0) return ret; if (v->length > len && v->data[len] != 0) { return -1; } return 0; }
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
269,560,384,926,165,080,000,000,000,000,000,000,000
12
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
pa2la(UINT8 *out, const UINT8 *in, int xsize, const UINT8 *palette) { int x; /* FIXME: precalculate greyscale palette? */ for (x = 0; x < xsize; x++, in += 4, out += 4) { out[0] = out[1] = out[2] = L(&palette[in[0] * 4]) / 1000; out[3] = in[3]; } }
0
[ "CWE-120" ]
Pillow
518ee3722a99d7f7d890db82a20bd81c1c0327fb
19,119,837,030,291,950,000,000,000,000,000,000,000
8
Use snprintf instead of sprintf
SCTP_STATIC int sctp_seqpacket_listen(struct sock *sk, int backlog) { struct sctp_sock *sp = sctp_sk(sk); struct sctp_endpoint *ep = sp->ep; /* Only UDP style sockets that are not peeled off are allowed to * listen(). */ if (!sctp_style(sk, UDP)) return -EINVAL; /* If backlog is zero, disable listening. */...
0
[]
linux-2.6
5e739d1752aca4e8f3e794d431503bfca3162df4
148,203,341,676,715,560,000,000,000,000,000,000,000
52
sctp: fix potential panics in the SCTP-AUTH API. All of the SCTP-AUTH socket options could cause a panic if the extension is disabled and the API is envoked. Additionally, there were some additional assumptions that certain pointers would always be valid which may not always be the case. This patch hardens the API a...
static void emitline(JF, js_Ast *node) { F->lastline = node->line; }
0
[ "CWE-703", "CWE-787" ]
mujs
df8559e7bdbc6065276e786217eeee70f28fce66
29,541,294,882,048,075,000,000,000,000,000,000,000
4
Bug 704749: Clear jump list after patching jump addresses. Since we can emit a statement multiple times when compiling try/finally we have to use a new patch list for each instance.
int TNEFCheckForSignature(DWORD sig) { DWORD signature = 0x223E9F78; sig = SwapDWord((BYTE *)&sig, sizeof(DWORD)); if (signature == sig) { return 0; } else { return YTNEF_NOT_TNEF_STREAM; } }
0
[ "CWE-399", "CWE-125" ]
ytnef
3cb0f914d6427073f262e1b2b5fd973e3043cdf7
291,168,196,971,155,850,000,000,000,000,000,000,000
11
BugFix - Potential OOB with Fields of Size 0 Thanks to @hannob for contributing a malformed TNEF stream with a Version field of size 0. Now such files will return an error indicating invalid data.
userid_hint_free (gpointer key, gpointer value, gpointer user_data) { g_free (key); g_free (value); }
0
[ "CWE-200" ]
evolution-data-server
5d8b92c622f6927b253762ff9310479dd3ac627d
231,093,025,441,976,800,000,000,000,000,000,000,000
7
CamelGpgContext: Enclose email addresses in brackets. The recipient list for encrypting can be specified by either key ID or email address. Enclose email addresses in brackets to ensure an exact match, as per the gpg man page: HOW TO SPECIFY A USER ID ... By exact match on an email address. ...
return 0; #endif } inline FILE* _stdout(const bool throw_exception) { #ifndef cimg_use_r cimg::unused(throw_exception); return stdout; #else if (throw_exception) { cimg::exception_mode(0); throw CImgIOException("cimg::stdout(): Reference to 'stdout' stream not allowed in R mode " ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
182,104,096,880,379,470,000,000,000,000,000,000,000
13
Fix other issues in 'CImg<T>::load_bmp()'.
static inline void data_start(const struct iov_iter *i, unsigned int *iter_headp, size_t *offp) { unsigned int p_mask = i->pipe->ring_size - 1; unsigned int iter_head = i->head; size_t off = i->iov_offset; if (off && (!allocated(&i->pipe->bufs[iter_head & p_mask]) || off == PAGE_SIZE)) { iter_head...
0
[ "CWE-665", "CWE-284" ]
linux
9d2231c5d74e13b2a0546fee6737ee4446017903
282,139,213,610,774,040,000,000,000,000,000,000,000
15
lib/iov_iter: initialize "flags" in new pipe_buffer The functions copy_page_to_iter_pipe() and push_pipe() can both allocate a new pipe_buffer, but the "flags" member initializer is missing. Fixes: 241699cd72a8 ("new iov_iter flavour: pipe-backed") To: Alexander Viro <viro@zeniv.linux.org.uk> To: linux-fsdevel@vger.k...
static oe_off_t _consolefs_lseek(oe_fd_t* file_, oe_off_t offset, int whence) { oe_off_t ret = -1; OE_UNUSED(file_); OE_UNUSED(offset); OE_UNUSED(whence); OE_RAISE_ERRNO(OE_ESPIPE); done: return ret; }
0
[ "CWE-200", "CWE-552" ]
openenclave
bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b
122,759,884,034,980,630,000,000,000,000,000,000,000
12
Merge pull request from GHSA-525h-wxcc-f66m Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
qb_ipcs_event_sendv(struct qb_ipcs_connection * c, const struct iovec * iov, size_t iov_len) { ssize_t res; ssize_t resn; if (c == NULL) { return -EINVAL; } qb_ipcs_connection_ref(c); res = c->service->funcs.sendv(&c->event, iov, iov_len); if (res > 0) { c->stats.events++; resn = new_event_notifica...
0
[ "CWE-59" ]
libqb
e322e98dc264bc5911d6fe1d371e55ac9f95a71e
114,504,401,479,899,440,000,000,000,000,000,000,000
40
ipc: use O_EXCL on SHM files, and randomize the names Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
static int sqrq_state_to_qp_state(u8 sq_state, u8 rq_state, struct mlx5_ib_qp *qp, u8 *qp_state) { static const u8 sqrq_trans[MLX5_RQ_NUM_STATE][MLX5_SQ_NUM_STATE] = { [MLX5_RQC_STATE_RST] = { [MLX5_SQC_STATE_RST] = IB_QPS_RESET, [MLX5_SQC_STATE_RDY] = MLX5_QP_STATE_BAD, [MLX5_SQC_STATE_ERR] = MLX5_QP...
0
[ "CWE-119", "CWE-787" ]
linux
0625b4ba1a5d4703c7fb01c497bd6c156908af00
89,339,401,306,690,400,000,000,000,000,000,000,000
44
IB/mlx5: Fix leaking stack memory to userspace mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes were written. Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp") Cc: <stable@vger.kernel.org> Acked-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <...
void LibRaw::unpacked_load_raw_fuji_f700s20() { int base_offset = 0; int row_size = imgdata.sizes.raw_width * 2; // in bytes if(imgdata.idata.raw_count==2 && imgdata.params.shot_select) { libraw_internal_data.internal_data.input->seek(-row_size,SEEK_CUR); base_offset = row_size; // in bytes } ...
0
[ "CWE-129" ]
LibRaw
89d065424f09b788f443734d44857289489ca9e2
201,317,868,440,381,630,000,000,000,000,000,000,000
17
fixed two more problems found by fuzzer
void HGraphBuilder::GenerateIsNonNegativeSmi(CallRuntime* call) { return Bailout("inlined runtime function: IsNonNegativeSmi"); }
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
246,217,927,558,937,380,000,000,000,000,000,000,000
3
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
void HStackCheckEliminator::Process() { // For each loop block walk the dominator tree from the backwards branch to // the loop header. If a call instruction is encountered the backwards branch // is dominated by a call and the stack check in the backwards branch can be // removed. for (int i = 0; i < graph_-...
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
260,164,992,705,184,900,000,000,000,000,000,000,000
29
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
static bool http_should_fail(struct Curl_easy *data) { int httpcode; DEBUGASSERT(data); DEBUGASSERT(data->conn); httpcode = data->req.httpcode; /* ** If we haven't been asked to fail on error, ** don't fail. */ if(!data->set.http_fail_on_error) return FALSE; /* ** Any code < 400 is never te...
0
[]
curl
48d7064a49148f03942380967da739dcde1cdc24
220,714,475,350,900,340,000,000,000,000,000,000,000
68
cookie: apply limits - Send no more than 150 cookies per request - Cap the max length used for a cookie: header to 8K - Cap the max number of received Set-Cookie: headers to 50 Bug: https://curl.se/docs/CVE-2022-32205.html CVE-2022-32205 Reported-by: Harry Sintonen Closes #9048
static int unpack_file (char *infilename, char *outfilename, int add_extension) { int64_t skip_sample_index = 0, until_samples_total = 0, total_unpacked_samples = 0; int result = WAVPACK_NO_ERROR, md5_diff = FALSE, created_riff_header = FALSE; int input_qmode, output_qmode = 0, input_format, output_format =...
0
[ "CWE-476", "CWE-703" ]
WavPack
25b4a2725d8568212e7cf89ca05ca29d128af7ac
115,959,357,491,219,300,000,000,000,000,000,000,000
512
issue #121: NULL pointer dereference in wvunpack.c * check for NULL pointer before dereferencing in wvunpack.c * sanitize custom extensions to be alphanumeric only
init_dh(uschar *dhparam, host_item *host) { BOOL yield = TRUE; BIO *bio; DH *dh; uschar *dhexpanded; if (!expand_check(dhparam, US"tls_dhparam", &dhexpanded)) return FALSE; if (dhexpanded == NULL) return TRUE; if ((bio = BIO_new_file(CS dhexpanded, "r")) == NULL) { tls_error(string_sprintf("could not read dhpa...
0
[]
exim
7be682ca5ebd9571a01b762195b11c34cd231830
63,694,384,531,540,700,000,000,000,000,000,000,000
39
TLS SNI support for OpenSSL ($tls_sni)
static inline int qdisc_qlen(struct Qdisc *q) { return q->q.qlen; }
0
[ "CWE-399" ]
linux-2.6
2ba2506ca7ca62c56edaa334b0fe61eb5eab6ab0
281,020,125,160,908,600,000,000,000,000,000,000,000
4
[NET]: Add preemption point in qdisc_run The qdisc_run loop is currently unbounded and runs entirely in a softirq. This is bad as it may create an unbounded softirq run. This patch fixes this by calling need_resched and breaking out if necessary. It also adds a break out if the jiffies value changes since that woul...
static int sco_sock_getname(struct socket *sock, struct sockaddr *addr, int *len, int peer) { struct sockaddr_sco *sa = (struct sockaddr_sco *) addr; struct sock *sk = sock->sk; BT_DBG("sock %p, sk %p", sock, sk); addr->sa_family = AF_BLUETOOTH; *len = sizeof(struct sockaddr_sco); if (peer) bacpy(&sa->sco_bd...
0
[ "CWE-200" ]
linux
c8c499175f7d295ef867335bceb9a76a2c3cdc38
231,253,797,778,237,140,000,000,000,000,000,000,000
17
Bluetooth: SCO - Fix missing msg_namelen update in sco_sock_recvmsg() If the socket is in state BT_CONNECT2 and BT_SK_DEFER_SETUP is set in the flags, sco_sock_recvmsg() returns early with 0 without updating the possibly set msg_namelen member. This, in turn, leads to a 128 byte kernel stack leak in net/socket.c. Fix...
static void nfs4_proc_commit_setup(struct nfs_write_data *data, struct rpc_message *msg) { struct nfs_server *server = NFS_SERVER(data->inode); if (data->lseg) { data->args.bitmask = NULL; data->res.fattr = NULL; } else data->args.bitmask = server->cache_consistency_bitmask; if (!data->write_done_cb) data-...
0
[ "CWE-703", "CWE-189" ]
linux
bf118a342f10dafe44b14451a1392c3254629a1f
257,289,844,126,179,070,000,000,000,000,000,000,000
14
NFSv4: include bitmap in nfsv4 get acl data The NFSv4 bitmap size is unbounded: a server can return an arbitrary sized bitmap in an FATTR4_WORD0_ACL request. Replace using the nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server with the inclusion of the bitmap (xdr length plus bitmasks) and...
Field_vers_trx_id(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, enum utype unireg_check_arg, const LEX_CSTRING *field_name_arg, bool zero_arg, bool unsigned_arg) : Field_longlong(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, ...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
277,586,587,269,350,750,000,000,000,000,000,000,000
9
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
evdev_drain_fd(int fd) { struct input_event ev[24]; size_t sz = sizeof ev; while (read(fd, &ev, sz) == (int)sz) { /* discard all pending events */ } }
0
[ "CWE-134" ]
libinput
a423d7d3269dc32a87384f79e29bb5ac021c83d1
49,159,921,699,133,720,000,000,000,000,000,000,000
9
evdev: strip the device name of format directives This fixes a format string vulnerabilty. evdev_log_message() composes a format string consisting of a fixed prefix (including the rendered device name) and the passed-in format buffer. This format string is then passed with the arguments to the actual log handler, whi...
static uint64_t zynq_slcr_compute_clock(const uint64_t periods[], uint32_t ctrl_reg, unsigned index) { uint32_t srcsel = extract32(ctrl_reg, 4, 2); /* bits [5:4] */ uint32_t divisor = extract32(ctrl_reg, 8, 6); /* bits [13:8] */ ...
0
[]
qemu
98a8cc741dad9cb4738f81a994bcf8d77d619152
55,966,207,586,722,420,000,000,000,000,000,000,000
22
hw/misc/zynq_slcr: Avoid #DIV/0! error Malicious user can set the feedback divisor for the PLLs to zero, triggering a floating-point exception (SIGFPE). As the datasheet [*] is not clear how hardware behaves when these bits are zeroes, use the maximum divisor possible (128) to avoid the software FPE. [*] Zynq-7000 T...
ofputil_port_to_string(ofp_port_t port, const struct ofputil_port_map *port_map, char *namebuf, size_t bufsize) { const char *reserved_name = ofputil_port_get_reserved_name(port); if (reserved_name) { ovs_strlcpy(namebuf, reserved_name, bufsize); ret...
0
[ "CWE-772" ]
ovs
77ad4225d125030420d897c873e4734ac708c66b
277,905,156,838,727,900,000,000,000,000,000,000,000
21
ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod(). Found by libFuzzer. Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
TEST(FieldPath, OptimizeOnVariableWithConstantScalarValue) { intrusive_ptr<ExpressionContextForTest> expCtx(new ExpressionContextForTest()); auto varId = expCtx->variablesParseState.defineVariable("userVar"); expCtx->variables.setConstantValue(varId, Value(123)); auto expr = ExpressionFieldPath::parse(...
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
145,293,557,296,351,550,000,000,000,000,000,000,000
11
SERVER-38070 fix infinite loop in agg expression
int proc_doulongvec_minmax(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { return -ENOSYS; }
0
[ "CWE-284", "CWE-264" ]
linux
bfdc0b497faa82a0ba2f9dddcf109231dd519fcc
3,753,205,654,681,923,500,000,000,000,000,000,000
5
sysctl: restrict write access to dmesg_restrict When dmesg_restrict is set to 1 CAP_SYS_ADMIN is needed to read the kernel ring buffer. But a root user without CAP_SYS_ADMIN is able to reset dmesg_restrict to 0. This is an issue when e.g. LXC (Linux Containers) are used and complete user space is running without CA...
static int reencrypt_digest(struct luks2_hdr *hdr, unsigned new) { int segment = LUKS2_get_segment_id_by_flag(hdr, new ? "backup-final" : "backup-previous"); if (segment < 0) return segment; return LUKS2_digest_by_segment(hdr, segment); }
0
[ "CWE-345" ]
cryptsetup
0113ac2d889c5322659ad0596d4cfc6da53e356c
123,706,880,117,736,840,000,000,000,000,000,000,000
9
Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack Fix possible attacks against data confidentiality through LUKS2 online reencryption extension crash recovery. An attacker can modify on-disk metadata to simulate decryption in progress with crashed (unfinished) reencryption step and persistently decrypt par...
ZEND_VM_HELPER(zend_shift_right_helper, ANY, ANY, zval *op_1, zval *op_2) { USE_OPLINE SAVE_OPLINE(); if (UNEXPECTED(Z_TYPE_INFO_P(op_1) == IS_UNDEF)) { op_1 = ZVAL_UNDEFINED_OP1(); } if (UNEXPECTED(Z_TYPE_INFO_P(op_2) == IS_UNDEF)) { op_2 = ZVAL_UNDEFINED_OP2(); } shift_right_function(EX_VAR(opline->result...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
295,758,385,683,148,100,000,000,000,000,000,000,000
20
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
static bool consume_stock(struct mem_cgroup *memcg) { struct memcg_stock_pcp *stock; bool ret = true; stock = &get_cpu_var(memcg_stock); if (memcg == stock->cached && stock->nr_pages) stock->nr_pages--; else /* need to call res_counter_charge */ ret = false; put_cpu_var(memcg_stock); return ret; }
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
340,042,301,317,938,800,000,000,000,000,000,000,000
13
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
static void tsc210x_audio_out_cb(TSC210xState *s, int free_b) { if (s->codec.out.len >= free_b) { tsc210x_out_flush(s, free_b); return; } s->codec.out.size = MIN(free_b, 16384); qemu_irq_raise(s->codec.tx_start); }
0
[ "CWE-119" ]
qemu
5193be3be35f29a35bc465036cd64ad60d43385f
215,777,201,912,934,920,000,000,000,000,000,000,000
10
tsc210x: fix buffer overrun on invalid state load CVE-2013-4539 s->precision, nextprecision, function and nextfunction come from wire and are used as idx into resolution[] in TSC_CUT_RESOLUTION. Validate after load to avoid buffer overrun. Cc: Andreas Färber <afaerber@suse.de> Signed-off-by: Michael S. Tsirkin <mst...
STATIC U8 * S_reghop3(U8 *s, SSize_t off, const U8* lim) { /* return the position 'off' UTF-8 characters away from 's', forward if * 'off' >= 0, backwards if negative. But don't go outside of position * 'lim', which better be < s if off < 0 */ PERL_ARGS_ASSERT_REGHOP3; if (off >= 0) { while (...
0
[ "CWE-416" ]
perl5
22b433eff9a1ffa2454e18405a56650f07b385b5
303,950,407,788,814,900,000,000,000,000,000,000,000
30
PATCH [perl #123562] Regexp-matching "hangs" The regex engine got into an infinite loop because of the malformation. It is trying to back-up over a sequence of UTF-8 continuation bytes. But the character just before the sequence should be a start byte. If not, there is a malformation. I added a test to croak if that...
void test_checkout_nasty__symlink3(void) { test_checkout_passes("refs/heads/symlink3", ".git/foobar"); }
0
[ "CWE-20", "CWE-706" ]
libgit2
3f7851eadca36a99627ad78cbe56a40d3776ed01
37,332,447,473,504,477,000,000,000,000,000,000,000
4
Disallow NTFS Alternate Data Stream attacks, even on Linux/macOS A little-known feature of NTFS is that it offers to store metadata in so-called "Alternate Data Streams" (inspired by Apple's "resource forks") that are copied together with the file they are associated with. These Alternate Data Streams can be accessed ...
GF_Err tpay_Size(GF_Box *s) { s->size += 4; return GF_OK; }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
31,258,913,503,091,024,000,000,000,000,000,000,000
5
prevent dref memleak on invalid input (#1183)
static uint32_t readint32(char *buf) { return *(uint32_t *) buf; }
0
[ "CWE-78", "CWE-216" ]
runc
0a8e4117e7f715d5fbeef398405813ce8e88558b
61,340,079,144,066,950,000,000,000,000,000,000,000
4
nsenter: clone /proc/self/exe to avoid exposing host binary to container There are quite a few circumstances where /proc/self/exe pointing to a pretty important container binary is a _bad_ thing, so to avoid this we have to make a copy (preferably doing self-clean-up and not being writeable). We require memfd_create(...
authentic_select_file(struct sc_card *card, const struct sc_path *path, struct sc_file **file_out) { struct sc_context *ctx = card->ctx; struct sc_apdu apdu; struct sc_path lpath; unsigned char rbuf[SC_MAX_APDU_BUFFER_SIZE]; int pathlen, rv; LOG_FUNC_CALLED(ctx); authentic_debug_select_file(card, path); me...
0
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
95,807,585,528,778,320,000,000,000,000,000,000,000
83
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
_PG_init(void) { /* * Be sure we do initialization only once. * * If initialization fails due to, e.g., plperl_init_interp() throwing an * exception, then we'll return here on the next usage and the user will * get a rather cryptic: ERROR: attempt to redefine parameter * "plperl.use_strict" */ static b...
0
[ "CWE-264" ]
postgres
537cbd35c893e67a63c59bc636c3e888bd228bc7
66,692,527,574,854,220,000,000,000,000,000,000,000
111
Prevent privilege escalation in explicit calls to PL validators. The primary role of PL validators is to be called implicitly during CREATE FUNCTION, but they are also normal functions that a user can call explicitly. Add a permissions check to each validator to ensure that a user cannot use explicit validator calls ...
xmlUnsetNsProp(xmlNodePtr node, xmlNsPtr ns, const xmlChar *name) { xmlAttrPtr prop; prop = xmlGetPropNodeInternal(node, name, (ns != NULL) ? ns->href : NULL, 0); if (prop == NULL) return(-1); xmlUnlinkNode((xmlNodePtr) prop); xmlFreeProp(prop); return(0); }
0
[ "CWE-20" ]
libxml2
bdd66182ef53fe1f7209ab6535fda56366bd7ac9
243,657,308,938,804,200,000,000,000,000,000,000,000
10
Avoid building recursive entities For https://bugzilla.gnome.org/show_bug.cgi?id=762100 When we detect a recusive entity we should really not build the associated data, moreover if someone bypass libxml2 fatal errors and still tries to serialize a broken entity make sure we don't risk to get ito a recursion * parser...
MagickExport MagickBooleanType AutoGammaImage(Image *image, ExceptionInfo *exception) { double gamma, log_mean, mean, sans; MagickStatusType status; register ssize_t i; log_mean=log(0.5); if (image->channel_mask == DefaultChannels) { /* Apply gamma correction equ...
0
[ "CWE-125" ]
ImageMagick
76401e172ea3a55182be2b8e2aca4d07270f6da6
49,162,043,652,453,330,000,000,000,000,000,000,000
48
Evaluate lazy pixel cache morphology to prevent buffer overflow (bug report from Ibrahim M. El-Sayed)
static void recv_handler(struct work_struct *work) { struct sk_buff *skb; struct capi20_appl *ap = container_of(work, struct capi20_appl, recv_work); if ((!ap) || (ap->release_in_progress)) return; mutex_lock(&ap->recv_mtx); while ((skb = skb_dequeue(&ap->recv_queue))) { if (CAPIMSG_CMD(skb->data) == CAPI_...
0
[ "CWE-125" ]
linux
1f3e2e97c003f80c4b087092b225c8787ff91e4d
224,867,444,951,024,060,000,000,000,000,000,000,000
20
isdn: cpai: check ctr->cnr to avoid array index out of bound The cmtp_add_connection() would add a cmtp session to a controller and run a kernel thread to process cmtp. __module_get(THIS_MODULE); session->task = kthread_run(cmtp_session, session, "kcmtpd_ctr_%d", session->num); During this process, the ker...
get_past_head(char_u *path) { char_u *retval; #if defined(MSWIN) // may skip "c:" if (isalpha(path[0]) && path[1] == ':') retval = path + 2; else retval = path; #else # if defined(AMIGA) // may skip "label:" retval = vim_strchr(path, ':'); if (retval == NULL) retval = path; # else // Un...
0
[ "CWE-823", "CWE-703" ]
vim
5921aeb5741fc6e84c870d68c7c35b93ad0c9f87
218,350,369,199,321,150,000,000,000,000,000,000,000
26
patch 8.2.4418: crash when using special multi-byte character Problem: Crash when using special multi-byte character. Solution: Don't use isalpha() for an arbitrary character.
static inline bool hctx_allow_merges(struct blk_mq_hw_ctx *hctx) { return (hctx->flags & BLK_MQ_F_SHOULD_MERGE) && !blk_queue_nomerges(hctx->queue); }
0
[ "CWE-362", "CWE-264" ]
linux
0048b4837affd153897ed1222283492070027aa9
40,865,287,955,388,356,000,000,000,000,000,000,000
5
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. ...
static int rtnl_net_newid(struct sk_buff *skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack) { struct net *net = sock_net(skb->sk); struct nlattr *tb[NETNSA_MAX + 1]; struct nlattr *nla; struct net *peer; int nsid, err; err = nlmsg_parse(nlh, sizeof(struct rtgenmsg), tb, NETNSA_MAX, rtnl_net_po...
0
[ "CWE-416" ]
linux
21b5944350052d2583e82dd59b19a9ba94a007f0
1,210,481,807,404,299,600,000,000,000,000,000,000
59
net: Fix double free and memory corruption in get_net_ns_by_id() (I can trivially verify that that idr_remove in cleanup_net happens after the network namespace count has dropped to zero --EWB) Function get_net_ns_by_id() does not check for net::count after it has found a peer in netns_ids idr. It may dereference a...
\param[out] z Z-coordinate of the pixel value, if test succeeds. \note If true, set coordinates (n,x,y,z). **/ template<typename t>
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
250,212,598,674,509,130,000,000,000,000,000,000,000
4
Fix other issues in 'CImg<T>::load_bmp()'.
static int decode_header(EXRContext *s, AVFrame *frame) { AVDictionary *metadata = NULL; int magic_number, version, i, flags, sar = 0; int layer_match = 0; int ret; int dup_channels = 0; s->current_channel_offset = 0; s->xmin = ~0; s->xmax = ~0; s->ymin ...
0
[ "CWE-787" ]
FFmpeg
b0a8b40294ea212c1938348ff112ef1b9bf16bb3
177,675,766,612,345,140,000,000,000,000,000,000,000
377
avcodec/exr: skip bottom clearing loop when its outside the image Fixes: signed integer overflow: 1633771809 * 32960 cannot be represented in type 'int' Fixes: 26532/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5613925708857344 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tr...
static void floppy_release(struct gendisk *disk, fmode_t mode) { int drive = (long)disk->private_data; mutex_lock(&floppy_mutex); mutex_lock(&open_lock); if (!UDRS->fd_ref--) { DPRINT("floppy_release with fd_ref == 0"); UDRS->fd_ref = 0; } if (!UDRS->fd_ref) opened_bdev[drive] = NULL; mutex_unlock(&open_l...
0
[ "CWE-264", "CWE-754" ]
linux
ef87dbe7614341c2e7bfe8d32fcb7028cc97442c
138,594,944,076,693,510,000,000,000,000,000,000,000
15
floppy: ignore kernel-only members in FDRAWCMD ioctl input Always clear out these floppy_raw_cmd struct members after copying the entire structure from userspace so that the in-kernel version is always valid and never left in an interdeterminate state. Signed-off-by: Matthew Daley <mattd@bugfuzz.com> Signed-off-by: L...
static inline bool check_if_root_index(const struct ATTRIB *attr, const struct INDEX_HDR *hdr, const struct LOG_REC_HDR *lrh) { u16 ao = le16_to_cpu(lrh->attr_off); u32 de_off = le32_to_cpu(hdr->de_off); u32 o = PtrOffset(attr, hdr) + de_off; const struct NTFS_DE *e = Add2Ptr(hdr, de_off); u3...
0
[ "CWE-416" ]
linux
f26967b9f7a830e228bb13fb41bd516ddd9d789d
42,664,026,821,162,390,000,000,000,000,000,000,000
26
fs/ntfs3: Fix invalid free in log_replay log_read_rst() returns ENOMEM error when there is not enough memory. In this case, if info is returned without initialization, it attempts to kfree the uninitialized info->r_page pointer. This patch moves the memset initialization code to before log_read_rst() is called. Repor...
ModHandle CModules::OpenModule(const CString& sModule, const CString& sModPath, CModInfo& Info, CString& sRetMsg) { // Some sane defaults in case anything errors out below sRetMsg.clear(); if (!ValidateModuleName(sModule, sRetMsg)) { return nullptr; } // The ...
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
43,412,285,632,665,340,000,000,000,000,000,000,000
69
Fix remote code execution and privilege escalation vulnerability. To trigger this, need to have a user already. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. CVE-2019-12816
void put_ucounts(struct ucounts *ucounts) { unsigned long flags; if (atomic_dec_and_lock_irqsave(&ucounts->count, &ucounts_lock, flags)) { hlist_del_init(&ucounts->node); spin_unlock_irqrestore(&ucounts_lock, flags); kfree(ucounts); } }
1
[ "CWE-416" ]
linux
f9d87929d451d3e649699d0f1d74f71f77ad38f5
181,058,700,363,456,860,000,000,000,000,000,000,000
10
ucount: Make get_ucount a safe get_user replacement When the ucount code was refactored to create get_ucount it was missed that some of the contexts in which a rlimit is kept elevated can be the only reference to the user/ucount in the system. Ordinary ucount references exist in places that also have a reference to ...
bool OSDService::check_failsafe_full(ostream &ss) const { return _check_full(FAILSAFE, ss); }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
304,512,249,421,863,660,000,000,000,000,000,000,000
4
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
perf_lock_task_context(struct task_struct *task, int ctxn, unsigned long *flags) { struct perf_event_context *ctx; retry: /* * One of the few rules of preemptible RCU is that one cannot do * rcu_read_unlock() while holding a scheduler (or nested) lock when * part of the read side critical section was preemptib...
0
[ "CWE-284", "CWE-264" ]
linux
f63a8daa5812afef4f06c962351687e1ff9ccb2b
169,511,562,954,552,980,000,000,000,000,000,000,000
45
perf: Fix event->ctx locking There have been a few reported issues wrt. the lack of locking around changing event->ctx. This patch tries to address those. It avoids the whole rwsem thing; and while it appears to work, please give it some thought in review. What I did fail at is sensible runtime checks on the use of ...
R_API ut64 r_bin_java_find_method_offset(RBinJavaObj *bin, const char *method_name) { RListIter *attr_iter = NULL, *attr_iter_tmp = NULL; RBinJavaField *method = NULL; ut64 offset = -1; r_list_foreach_safe (bin->methods_list, attr_iter, attr_iter_tmp, method) { if (method && !strcmp ((const char *) method->name, ...
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
52,193,168,175,476,480,000,000,000,000,000,000,000
12
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
ecckey_from_sexp (gcry_mpi_t *array, gcry_sexp_t sexp, int algo) { gpg_error_t err; gcry_sexp_t list, l2; char *curve; int i; const char *oidstr; unsigned int nbits; array[0] = NULL; array[1] = NULL; array[2] = NULL; list = gcry_sexp_find_token (sexp, "public-key", 0); if (!list) return gpg_...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
95,733,059,350,872,170,000,000,000,000,000,000,000
83
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
static int handle_vf_guid(struct net_device *dev, struct ifla_vf_guid *ivt, int guid_type) { if (dev->type != ARPHRD_INFINIBAND) return -EOPNOTSUPP; return handle_infiniband_guid(dev, ivt, guid_type); }
0
[ "CWE-200" ]
net
5f8e44741f9f216e33736ea4ec65ca9ac03036e6
174,366,461,603,502,960,000,000,000,000,000,000,000
7
net: fix infoleak in rtnetlink The stack object “map” has a total size of 32 bytes. Its last 4 bytes are padding generated by compiler. These padding bytes are not initialized and sent out via “nla_put”. Signed-off-by: Kangjie Lu <kjlu@gatech.edu> Signed-off-by: David S. Miller <davem@davemloft.net>