func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
process_cmd_cyclelogs(CMD_Request *msg, char *line) { msg->command = htons(REQ_CYCLELOGS); }
0
[ "CWE-189" ]
chrony
7712455d9aa33d0db0945effaa07e900b85987b1
2,557,649,265,949,487,800,000,000,000,000,000,000
4
Fix buffer overflow when processing crafted command packets When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES, RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is calculated, the number of items stored in the packet is not v...
static void __init of_unittest_overlay_11(void) { int ret; /* device should disable */ ret = of_unittest_apply_revert_overlay_check(11, 11, 0, 1, PDEV_OVERLAY); unittest(ret == 0, "overlay test %d failed; overlay apply\n", 11); }
0
[ "CWE-401" ]
linux
e13de8fe0d6a51341671bbe384826d527afe8d44
286,301,945,936,859,600,000,000,000,000,000,000,000
9
of: unittest: fix memory leak in unittest_data_add In unittest_data_add, a copy buffer is created via kmemdup. This buffer is leaked if of_fdt_unflatten_tree fails. The release for the unittest_data buffer is added. Fixes: b951f9dc7f25 ("Enabling OF selftest to run without machine's devicetree") Signed-off-by: Navid ...
static VOID MiniportDisableInterruptEx(IN PVOID MiniportInterruptContext) { DEBUG_ENTRY(0); PARANDIS_ADAPTER *pContext = (PARANDIS_ADAPTER *)MiniportInterruptContext; /* TODO - make sure that interrups are not reenabled by the DPC callback*/ for (UINT i = 0; i < pContext->nPathBundles; i++) { ...
0
[ "CWE-20" ]
kvm-guest-drivers-windows
723416fa4210b7464b28eab89cc76252e6193ac1
321,491,980,848,722,500,000,000,000,000,000,000,000
16
NetKVM: BZ#1169718: Checking the length only on read Signed-off-by: Joseph Hindin <yhindin@rehat.com>
static void vmx_set_supported_cpuid(u32 func, struct kvm_cpuid_entry2 *entry) { if (func == 1 && nested) entry->ecx |= bit(X86_FEATURE_VMX); }
0
[]
kvm
a642fc305053cc1c6e47e4f4df327895747ab485
132,664,864,919,120,670,000,000,000,000,000,000,000
5
kvm: vmx: handle invvpid vm exit gracefully On systems with invvpid instruction support (corresponding bit in IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid causes vm exit, which is currently not handled and results in propagation of unknown exit to userspace. Fix this by installing an invvpid vm exit ...
lou_getTable(const char *tableList) { const TranslationTableHeader *table; const DisplayTableHeader *displayTable; _lou_getTable(tableList, tableList, &table, &displayTable); if (!table || !displayTable) return NULL; return table; }
0
[ "CWE-787" ]
liblouis
2e4772befb2b1c37cb4b9d6572945115ee28630a
243,729,917,567,687,400,000,000,000,000,000,000,000
7
Prevent an invalid memory writes in compileRule Thanks to Han Zheng for reporting it Fixes #1214
static void t1_start_eexec(void) { int i; assert(is_included(fd_cur->fm)); get_length1(); save_offset(); if (!t1_pfa) t1_check_block_len(false); for (t1_line_ptr = t1_line_array, i = 0; i < 4; i++) { edecrypt((byte)t1_getbyte()); *t1_line_ptr++ = 0; } t1_eexec_enc...
0
[ "CWE-119" ]
texlive-source
6ed0077520e2b0da1fd060c7f88db7b2e6068e4c
120,125,981,509,518,140,000,000,000,000,000,000,000
15
writet1 protection against buffer overflow git-svn-id: svn://tug.org/texlive/trunk/Build/source@48697 c570f23f-e606-0410-a88d-b1316a301751
ip_vs_new_dest(struct ip_vs_service *svc, struct ip_vs_dest_user_kern *udest, struct ip_vs_dest **dest_p) { struct ip_vs_dest *dest; unsigned atype; EnterFunction(2); #ifdef CONFIG_IP_VS_IPV6 if (svc->af == AF_INET6) { atype = ipv6_addr_type(&udest->addr.in6); if ((!(atype & IPV6_ADDR_UNICAST) || a...
0
[ "CWE-119", "CWE-787" ]
linux
04bcef2a83f40c6db24222b27a52892cba39dffb
326,318,106,719,681,320,000,000,000,000,000,000,000
53
ipvs: Add boundary check on ioctl arguments The ipvs code has a nifty system for doing the size of ioctl command copies; it defines an array with values into which it indexes the cmd to find the right length. Unfortunately, the ipvs code forgot to check if the cmd was in the range that the array provides, allowing fo...
PHPAPI char *xml_utf8_decode(const XML_Char *s, int len, int *newlen, const XML_Char *encoding) { size_t pos = 0; char *newbuf = emalloc(len + 1); unsigned int c; char (*decoder)(unsigned short) = NULL; xml_encoding *enc = xml_get_encoding(encoding); *newlen = 0; if (enc) { decoder = enc->decoding_function; ...
0
[ "CWE-787" ]
php-src
7d163e8a0880ae8af2dd869071393e5dc07ef271
188,769,794,512,626,480,000,000,000,000,000,000,000
39
truncate results at depth of 255 to prevent corruption
xcf_load_layer (XcfInfo *info, GimpImage *image, GList **item_path) { GimpLayer *layer; GimpLayerMask *layer_mask; goffset hierarchy_offset; goffset layer_mask_offset; gboolean apply_mask = TRUE; gboolean edit_mask...
0
[ "CWE-120" ]
gimp
4f99f1fcfd892ead19831b5adcd38a99d71214b6
134,952,859,526,694,850,000,000,000,000,000,000,000
241
app: fix #8120 GIMP 2.10.30 crashed when allocate large memory GIMP could crash if the information regarding old path properties read from XCF was incorrect. It did not check if xcf_old_path succeeded and kept trying to load more paths even if the last one failed to load. Instead we now stop loading paths as soon as ...
GF_Err gf_isom_dump_hint_sample(GF_ISOFile *the_file, u32 trackNumber, u32 SampleNum, FILE * trace) { GF_ISOSample *tmp; GF_HintSampleEntryBox *entry; u32 descIndex, count, count2, i; GF_Err e=GF_OK; GF_BitStream *bs; GF_HintSample *s; GF_TrackBox *trak; GF_RTPPacket *pck; char *szName; trak = gf_isom_get_tr...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
54,626,223,411,689,950,000,000,000,000,000,000,000
107
fixed #2138
static size_t phar_dir_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC) /* {{{ */ { return 0; }
0
[ "CWE-824" ]
php-src
9649ca1630433473a307d015ba1a79a4a7a779f5
248,255,708,329,473,530,000,000,000,000,000,000,000
4
Fixed bug #71331 - Uninitialized pointer in phar_make_dirstream()
static double min() { return -DBL_MAX; }
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
138,814,667,380,707,180,000,000,000,000,000,000,000
1
Fix other issues in 'CImg<T>::load_bmp()'.
dp_packet_ip_checksum_valid(const struct dp_packet *p) { return (p->mbuf.ol_flags & PKT_RX_IP_CKSUM_MASK) == PKT_RX_IP_CKSUM_GOOD; }
0
[ "CWE-400" ]
ovs
3512fb512c76a1f08eba4005aa2eb69160d0840e
305,096,763,644,280,400,000,000,000,000,000,000,000
5
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
static void csi_L(struct vc_data *vc, unsigned int nr) { if (nr > vc->vc_rows - vc->state.y) nr = vc->vc_rows - vc->state.y; else if (!nr) nr = 1; con_scroll(vc, vc->state.y, vc->vc_bottom, SM_DOWN, nr); vc->vc_need_wrap = 0; }
0
[ "CWE-125" ]
linux
3c4e0dff2095c579b142d5a0693257f1c58b4804
258,386,030,269,755,040,000,000,000,000,000,000,000
9
vt: Disable KD_FONT_OP_COPY It's buggy: On Fri, Nov 06, 2020 at 10:30:08PM +0800, Minh Yuan wrote: > We recently discovered a slab-out-of-bounds read in fbcon in the latest > kernel ( v5.10-rc2 for now ). The root cause of this vulnerability is that > "fbcon_do_set_font" did not handle "vc->vc_font.data" and > "vc->...
static int allocate_timeout_image(struct v4l2_loopback_device *dev) { MARK(); if (dev->buffer_size <= 0) return -EINVAL; if (dev->timeout_image == NULL) { dev->timeout_image = v4l2l_vzalloc(dev->buffer_size); if (dev->timeout_image == NULL) return -ENOMEM; } return 0; }
0
[ "CWE-787" ]
v4l2loopback
64a216af4c09c9ba9326057d7e78994271827eff
114,001,863,087,248,920,000,000,000,000,000,000,000
13
add explicit format specifier to printf() invocations CWE-134
utf16be_to_unicode(uint32_t *pwc, const char *s, size_t n) { return (utf16_to_unicode(pwc, s, n, 1)); }
0
[ "CWE-476" ]
libarchive
42a3408ac7df1e69bea9ea12b72e14f59f7400c0
162,301,518,124,625,180,000,000,000,000,000,000,000
4
archive_strncat_l(): allocate and do not convert if length == 0 This ensures e.g. that archive_mstring_copy_mbs_len_l() does not set aes_set = AES_SET_MBS with aes_mbs.s == NULL. Resolves possible null-pointer dereference reported by OSS-Fuzz. Reported-By: OSS-Fuzz issue 286
serverfailed (const char *buf, unsigned int len) { char out[12]; unsigned int rcode = 0; if (!dns_packet_copy (buf, len, 0, out, 12)) return 1; rcode = out[3]; rcode &= 15; if (rcode && (rcode != 3)) { errno = error_again; return 1; } return 0; }
0
[ "CWE-362" ]
ndjbdns
177b5522e9b3d25778001c8cebfddd4d2973fcfd
185,259,921,950,624,520,000,000,000,000,000,000,000
18
Merge identical outgoing requests - patch 2. This patch fixes dnscache to combine *same* client queries into one single outgoing request, thus securing the server from possible cache poisoning attacks. The merges operation takes place in the dns_transmit layer, rather than between query and dns_transmit layers, as don...
int Http2Stream::DoWrite(WriteWrap* req_wrap, uv_buf_t* bufs, size_t nbufs, uv_stream_t* send_handle) { CHECK_NULL(send_handle); Http2Scope h2scope(this); if (!is_writable() || is_destroyed()) { req_wrap->Done(UV_EOF); return 0; ...
0
[ "CWE-416" ]
node
a3c33d4ce78f74d1cf1765704af5b427aa3840a6
226,614,132,839,470,670,000,000,000,000,000,000,000
26
http2: update handling of rst_stream with error code NGHTTP2_CANCEL The PR updates the handling of rst_stream frames and adds all streams to the pending list on receiving rst frames with the error code NGHTTP2_CANCEL. The changes will remove dependency on the stream state that may allow bypassing the checks in certai...
static void opj_j2k_write_qcc_in_memory( opj_j2k_t *p_j2k, OPJ_UINT32 p_comp_no, OPJ_BYTE * p_data, OPJ_UINT32 * p_data_writte...
0
[ "CWE-416" ]
openjpeg
940100c28ae28931722290794889cf84a92c5f6f
164,838,418,509,150,280,000,000,000,000,000,000,000
48
Fix potential use-after-free in opj_j2k_write_mco function Fixes #563
Value ExpressionFilter::serialize(bool explain) const { return Value(DOC("$filter" << DOC("input" << _input->serialize(explain) << "as" << _varName << "cond" << _filter->serialize(explain)))); }
0
[]
mongo
1772b9a0393b55e6a280a35e8f0a1f75c014f301
41,910,292,501,490,070,000,000,000,000,000,000,000
4
SERVER-49404 Enforce additional checks in $arrayToObject
xmlXIncludeLoadDoc(xmlXIncludeCtxtPtr ctxt, const xmlChar *url, int nr) { xmlDocPtr doc; xmlURIPtr uri; xmlChar *URL; xmlChar *fragment = NULL; int i = 0; #ifdef LIBXML_XPTR_ENABLED int saveFlags; #endif #ifdef DEBUG_XINCLUDE xmlGenericError(xmlGenericErrorContext, "Loading doc %s:%d\n", ur...
0
[ "CWE-416" ]
libxml2
1098c30a040e72a4654968547f415be4e4c40fe7
192,671,904,019,233,840,000,000,000,000,000,000,000
366
Fix user-after-free with `xmllint --xinclude --dropdtd` The --dropdtd option can leave dangling pointers in entity reference nodes. Make sure to skip these nodes when processing XIncludes. This also avoids scanning entity declarations and even modifying them inadvertently during XInclude processing. Move from a bloc...
static void sched_domain_debug(struct sched_domain *sd, int cpu) { int level = 0; if (!sched_debug_enabled) return; if (!sd) { printk(KERN_DEBUG "CPU%d attaching NULL sched-domain.\n", cpu); return; } printk(KERN_DEBUG "CPU%d attaching sched-domain:\n", cpu); for (;;) { if (sched_domain_debug_one(sd, ...
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
309,767,578,804,784,750,000,000,000,000,000,000,000
23
sched: panic on corrupted stack end Until now, hitting this BUG_ON caused a recursive oops (because oops handling involves do_exit(), which calls into the scheduler, which in turn raises an oops), which caused stuff below the stack to be overwritten until a panic happened (e.g. via an oops in interrupt context, cause...
mwifiex_is_rsn_oui_present(struct mwifiex_bssdescriptor *bss_desc, u32 cipher) { u8 *oui; struct ie_body *iebody; u8 ret = MWIFIEX_OUI_NOT_PRESENT; if (has_ieee_hdr(bss_desc->bcn_rsn_ie, WLAN_EID_RSN)) { iebody = (struct ie_body *) (((u8 *) bss_desc->bcn_rsn_ie->data) + RSN_GTK_OUI_OFFSET); oui = &mwi...
0
[ "CWE-269", "CWE-787" ]
linux
b70261a288ea4d2f4ac7cd04be08a9f0f2de4f4d
142,721,412,945,954,800,000,000,000,000,000,000,000
17
mwifiex: Fix possible buffer overflows in mwifiex_cmd_append_vsie_tlv() mwifiex_cmd_append_vsie_tlv() calls memcpy() without checking the destination size may trigger a buffer overflower, which a local user could use to cause denial of service or the execution of arbitrary code. Fix it by putting the length check befo...
TEST_F(QueryPlannerTest, ContainedOrPredicateIsLeadingFieldInBothBranchesIndexIntersection) { params.options = QueryPlannerParams::INCLUDE_COLLSCAN | QueryPlannerParams::INDEX_INTERSECTION; addIndex(BSON("a" << 1 << "b" << 1)); addIndex(BSON("a" << 1 << "c" << 1)); runQuery(fromjson("{$and: [{a: 5}, {$...
0
[]
mongo
64095239f41e9f3841d8be9088347db56d35c891
292,357,845,707,641,860,000,000,000,000,000,000,000
48
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
dissect_kafka_delete_groups_response_group(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, kafka_api_version_t api_version _U_) { proto_item *subti; proto_tree *subtree; subtree = proto_tree_add_subtree(tree, tvb, offset, -1, ett...
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
116,070,313,240,525,430,000,000,000,000,000,000,000
20
Kafka: Limit our decompression size. Don't assume that the Internet has our best interests at heart when it gives us the size of our decompression buffer. Assign an arbitrary limit of 50 MB. This fixes #16739 in that it takes care of ** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac...
add_bwrap_wrapper (FlatpakBwrap *bwrap, const char *app_info_path, GError **error) { glnx_autofd int app_info_fd = -1; g_auto(GLnxDirFdIterator) dir_iter = { 0 }; struct dirent *dent; g_autofree char *user_runtime_dir = realpath (g_get_user_runtime_dir (), NULL); ...
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
6,451,043,187,661,164,000,000,000,000,000,000,000
80
Don't expose /proc when running apply_extra As shown by CVE-2019-5736, it is sometimes possible for the sandbox app to access outside files using /proc/self/exe. This is not typically an issue for flatpak as the sandbox runs as the user which has no permissions to e.g. modify the host files. However, when installing ...
TEST_F(DnsImplConstructor, SupportsCustomResolvers) { char addr4str[INET_ADDRSTRLEN]; // we pick a port that isn't 53 as the default resolve.conf might be // set to point to localhost. auto addr4 = Network::Utility::parseInternetAddressAndPort("127.0.0.1:54"); char addr6str[INET6_ADDRSTRLEN]; auto addr6 = N...
0
[ "CWE-400" ]
envoy
542f84c66e9f6479bc31c6f53157c60472b25240
333,447,321,980,427,900,000,000,000,000,000,000,000
21
overload: Runtime configurable global connection limits (#147) Signed-off-by: Tony Allen <tony@allen.gg>
b64decode(const uschar *code, uschar **ptr) { int x, y; uschar *result = store_get(3*(Ustrlen(code)/4) + 1); *ptr = result; /* Each cycle of the loop handles a quantum of 4 input bytes. For the last quantum this may decode to 1, 2, or 3 output bytes. */ while ((x = *code++) != 0) { if (isspace(x)) continue; /*...
1
[ "CWE-119" ]
exim
cf3cd306062a08969c41a1cdd32c6855f1abecf1
156,390,020,671,884,460,000,000,000,000,000,000,000
64
Fix base64d() buffer size (CVE-2018-6789) Credits for discovering this bug: Meh Chang <meh@devco.re> (cherry picked from commit 062990cc1b2f9e5d82a413b53c8f0569075de700)
pop3_store_get_name (CamelService *service, gboolean brief) { CamelNetworkSettings *network_settings; CamelSettings *settings; gchar *host; gchar *user; gchar *name; settings = camel_service_ref_settings (service); network_settings = CAMEL_NETWORK_SETTINGS (settings); host = camel_network...
0
[ "CWE-74" ]
evolution-data-server
ba82be72cfd427b5d72ff21f929b3a6d8529c4df
189,664,970,453,673,370,000,000,000,000,000,000,000
29
I#226 - CVE-2020-14928: Response Injection via STARTTLS in SMTP and POP3 Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/226
should_get_directory_count_now (NautilusFile *file) { return lacks_directory_count (file) && !file->details->loading_directory; }
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
207,422,175,342,527,570,000,000,000,000,000,000,000
5
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
int usb_hub_init(void) { if (usb_register(&hub_driver) < 0) { printk(KERN_ERR "%s: can't register hub driver\n", usbcore_name); return -1; } /* * The workqueue needs to be freezable to avoid interfering with * USB-PERSIST port handover. Otherwise it might see that a full-speed * device was gone before ...
0
[ "CWE-703" ]
linux
e50293ef9775c5f1cf3fcc093037dd6a8c5684ea
14,006,900,770,278,028,000,000,000,000,000,000,000
24
USB: fix invalid memory access in hub_activate() Commit 8520f38099cc ("USB: change hub initialization sleeps to delayed_work") changed the hub_activate() routine to make part of it run in a workqueue. However, the commit failed to take a reference to the usb_hub structure or to lock the hub interface while doing so. ...
static int test_pages_in_a_zone(unsigned long start_pfn, unsigned long end_pfn) { unsigned long pfn; struct zone *zone = NULL; struct page *page; int i; for (pfn = start_pfn; pfn < end_pfn; pfn += MAX_ORDER_NR_PAGES) { i = 0; /* This is just a CONFIG_HOLES_IN_ZONE check.*/ while ((i < MAX_ORDER_N...
0
[]
linux-2.6
08dff7b7d629807dbb1f398c68dd9cd58dd657a1
334,908,323,966,673,820,000,000,000,000,000,000,000
22
mm/hotplug: correctly add new zone to all other nodes' zone lists When online_pages() is called to add new memory to an empty zone, it rebuilds all zone lists by calling build_all_zonelists(). But there's a bug which prevents the new zone to be added to other nodes' zone lists. online_pages() { build_all_zonelists(...
authentic_get_challenge(struct sc_card *card, unsigned char *rnd, size_t len) { /* 'GET CHALLENGE' returns always 24 bytes */ unsigned char rbuf[0x18]; size_t out_len; int r; LOG_FUNC_CALLED(card->ctx); r = iso_ops->get_challenge(card, rbuf, sizeof rbuf); LOG_TEST_RET(card->ctx, r, "GET CHALLENGE cmd failed");...
0
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
85,858,012,716,171,250,000,000,000,000,000,000,000
21
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
vrrp_linkbeat_handler(__attribute__((unused)) vector_t *strvec) { vrrp_t *vrrp = LIST_TAIL_DATA(vrrp_data->vrrp); vrrp->linkbeat_use_polling = true; }
0
[ "CWE-59", "CWE-61" ]
keepalived
04f2d32871bb3b11d7dc024039952f2fe2750306
222,150,735,462,269,570,000,000,000,000,000,000,000
6
When opening files for write, ensure they aren't symbolic links Issue #1048 identified that if, for example, a non privileged user created a symbolic link from /etc/keepalvied.data to /etc/passwd, writing to /etc/keepalived.data (which could be invoked via DBus) would cause /etc/passwd to be overwritten. This commit ...
DEFUN (bgp_redistribute_ipv6_metric, bgp_redistribute_ipv6_metric_cmd, "redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295>", "Redistribute information from another routing protocol\n" "Connected\n" "Kernel routes\n" "Open Shurtest Path First (OSPFv3)\n" ...
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
260,062,401,476,420,300,000,000,000,000,000,000,000
26
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
bool is_null() { if (check_null_ref()) return 1; else return Item_direct_ref::is_null(); }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
289,760,834,432,555,830,000,000,000,000,000,000,000
7
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
void KrecipesView::addCategoryAction( KAction * action ) { selectPanel->addCategoryAction( action ); }
0
[]
krecipes
cd1490fb5fe82cbe9172a43be13298001b446ecd
285,106,896,701,089,600,000,000,000,000,000,000,000
4
Use WebKit instead of KHTML for printing recipes, fixes sourceforge #2990118 and #2960140. svn path=/trunk/extragear/utils/krecipes/; revision=1137824
static void write_uid(bytearray_t * bplist, uint64_t val) { val = (uint32_t)val; int size = get_needed_bytes(val); uint8_t sz; //do not write 3bytes int node if (size == 3) size++; sz = BPLIST_UID | (size-1); // yes, this is what Apple does... val = be64toh(val); byte_array_appe...
0
[ "CWE-125" ]
libplist
4765d9a60ca4248a8f89289271ac69cbffcc29bc
301,237,534,369,356,640,000,000,000,000,000,000,000
14
bplist: Fix possible out-of-bounds read in parse_array_node() with proper bounds checking
TEST_P(DownstreamProtocolIntegrationTest, ManyRequestTrailersAccepted) { // Set header (and trailer) count limit to 200. uint32_t max_count = 200; config_helper_.addConfigModifier( [&](envoy::extensions::filters::network::http_connection_manager::v3::HttpConnectionManager& hcm) -> void { ...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
299,998,997,503,442,230,000,000,000,000,000,000,000
29
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
int setup_gss_names(struct svc_req *rqstp, gss_buffer_desc *client_name, gss_buffer_desc *server_name) { OM_uint32 maj_stat, min_stat; gss_name_t server_gss_name; if (gss_name_to_string(rqst2name(rqstp), client_name) != 0) return -1; maj_stat = gss_inquir...
0
[ "CWE-119", "CWE-772", "CWE-401" ]
krb5
83ed75feba32e46f736fcce0d96a0445f29b96c2
171,091,926,576,455,100,000,000,000,000,000,000,000
25
Fix leaks in kadmin server stubs [CVE-2015-8631] In each kadmind server stub, initialize the client_name and server_name variables, and release them in the cleanup handler. Many of the stubs will otherwise leak the client and server name if krb5_unparse_name() fails. Also make sure to free the prime_arg variables in...
static int vxlan_igmp_leave(struct vxlan_dev *vxlan) { struct sock *sk; union vxlan_addr *ip = &vxlan->default_dst.remote_ip; int ifindex = vxlan->default_dst.remote_ifindex; int ret = -EINVAL; if (ip->sa.sa_family == AF_INET) { struct vxlan_sock *sock4 = rtnl_dereference(vxlan->vn4_sock); struct ip_mreqn mre...
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
26,592,804,059,625,070,000,000,000,000,000,000,000
32
net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_o...
GF_Err clef_box_size(GF_Box *s) { s->size += 8; return GF_OK; }
0
[ "CWE-476" ]
gpac
6170024568f4dda310e98ef7508477b425c58d09
4,065,761,523,910,209,000,000,000,000,000,000,000
5
fixed potential crash - cf #1263
wav_open (SF_PRIVATE *psf) { WAVLIKE_PRIVATE * wpriv ; int format, subformat, error, blockalign = 0, framesperblock = 0 ; if ((wpriv = calloc (1, sizeof (WAVLIKE_PRIVATE))) == NULL) return SFE_MALLOC_FAILED ; psf->container_data = wpriv ; wpriv->wavex_ambisonic = SF_AMBISONIC_NONE ; psf->strings.flags = SF_STR...
0
[ "CWE-476" ]
libsndfile
6f3266277bed16525f0ac2f0f03ff4626f1923e5
255,410,201,298,750,700,000,000,000,000,000,000,000
126
Fix max channel count bug The code was allowing files to be written with a channel count of exactly `SF_MAX_CHANNELS` but was failing to read some file formats with the same channel count.
static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) { struct sock *sk = sock->sk; int err; pr_debug("%s(), cmd=%#x\n", __func__, cmd); err = -EINVAL; switch (cmd) { case TIOCOUTQ: { long amount; amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk); if (amount < 0) amount = 0; e...
0
[]
net
79462ad02e861803b3840cc782248c7359451cd9
78,744,470,606,627,250,000,000,000,000,000,000,000
52
net: add validation for the socket syscall protocol argument 郭永刚 reported that one could simply crash the kernel as root by using a simple program: int socket_fd; struct sockaddr_in addr; addr.sin_port = 0; addr.sin_addr.s_addr = INADDR_ANY; addr.sin_family = 10; socket_fd = socket(10,3,0x40000000); connect(s...
static ssize_t aac_show_reset_adapter(struct device *device, struct device_attribute *attr, char *buf) { struct aac_dev *dev = (struct aac_dev*)class_to_shost(device)->hostdata; int len, tmp; tmp = aac_adapter_check_health(dev); if ((tmp == 0) && dev->in_reset) tmp = -EBUSY; len = snprintf(b...
0
[ "CWE-284", "CWE-264" ]
linux
f856567b930dfcdbc3323261bf77240ccdde01f5
213,874,506,208,065,460,000,000,000,000,000,000,000
13
aacraid: missing capable() check in compat ioctl In commit d496f94d22d1 ('[SCSI] aacraid: fix security weakness') we added a check on CAP_SYS_RAWIO to the ioctl. The compat ioctls need the check as well. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torv...
static struct sock *udp6_lib_lookup2(struct net *net, const struct in6_addr *saddr, __be16 sport, const struct in6_addr *daddr, unsigned int hnum, int dif, struct udp_hslot *hslot2, unsigned int slot2) { struct sock *sk, *result; struct hlist_nulls_node *node; int score, badness; begin: result = NULL; badne...
0
[ "CWE-399" ]
linux
a9cf73ea7ff78f52662c8658d93c226effbbedde
105,958,602,687,904,280,000,000,000,000,000,000,000
42
ipv6: udp: fix the wrong headroom check At this point, skb->data points to skb_transport_header. So, headroom check is wrong. For some case:bridge(UFO is on) + eth device(UFO is off), there is no enough headroom for IPv6 frag head. But headroom check is always false. This will bring about data be moved to there prio...
static int u32_reoffload(struct tcf_proto *tp, bool add, flow_setup_cb_t *cb, void *cb_priv, struct netlink_ext_ack *extack) { struct tc_u_common *tp_c = tp->data; struct tc_u_hnode *ht; struct tc_u_knode *n; unsigned int h; int err; for (ht = rtnl_dereference(tp_c->hlist); ht; ht = rtnl_derefere...
0
[ "CWE-416" ]
linux
3db09e762dc79584a69c10d74a6b98f89a9979f8
324,375,662,473,087,520,000,000,000,000,000,000,000
46
net/sched: cls_u32: fix netns refcount changes in u32_change() We are now able to detect extra put_net() at the moment they happen, instead of much later in correct code paths. u32_init_knode() / tcf_exts_init() populates the ->exts.net pointer, but as mentioned in tcf_exts_init(), the refcount on netns has not been ...
static int swapin_walk_pmd_entry(pmd_t *pmd, unsigned long start, unsigned long end, struct mm_walk *walk) { pte_t *orig_pte; struct vm_area_struct *vma = walk->private; unsigned long index; if (pmd_none_or_trans_huge_or_clear_bad(pmd)) return 0; for (index = start; index != end; index += PAGE_SIZE) { pte_t...
0
[ "CWE-703", "CWE-835" ]
linux
6ea8d958a2c95a1d514015d4e29ba21a8c0a1a91
63,837,875,205,603,180,000,000,000,000,000,000,000
34
mm/madvise.c: fix madvise() infinite loop under special circumstances MADVISE_WILLNEED has always been a noop for DAX (formerly XIP) mappings. Unfortunately madvise_willneed() doesn't communicate this information properly to the generic madvise syscall implementation. The calling convention is quite subtle there. ma...
TEST(SegmentSumOpModelTest, TestFailIfSegmentsAreNotConsecutive) { SegmentSumOpModel<int32_t> model({TensorType_INT32, {3, 2}}, {TensorType_INT32, {3}}); model.PopulateTensor<int32_t>(model.data(), {1, 2, 3, 4, 5, 6}); model.PopulateTensor<int32_t>(model.segment_ids(), {0, 3, 5}...
0
[ "CWE-703", "CWE-787" ]
tensorflow
204945b19e44b57906c9344c0d00120eeeae178a
268,799,659,948,231,630,000,000,000,000,000,000,000
7
[tflite] Validate segment ids for segment_sum. Segment identifiers in segment_sum should be in a 1-D tensor of same size as the first dimension of the input. The values of the tensor should be integers from {0, 1, 2, ... k-1}, where k is the first dimension of the input. The segment identifiers must not contain jumps ...
int saveOriginalFilename(request_rec *r) { apr_table_set(r->notes, "Phusion Passenger: original filename", r->filename); return DECLINED; }
0
[ "CWE-59" ]
passenger
9dda49f4a3ebe9bafc48da1bd45799f30ce19566
165,943,730,756,354,260,000,000,000,000,000,000,000
4
Fixed a problem with graceful web server restarts. This problem was introduced in 4.0.6 during the attempt to fix issue #910.
yaml_parser_scan_version_directive_number(yaml_parser_t *parser, yaml_mark_t start_mark, int *number) { int value = 0; size_t length = 0; /* Repeat while the next character is digit. */ if (!CACHE(parser, 1)) return 0; while (IS_DIGIT(parser->buffer)) { /* Check if the number ...
0
[ "CWE-20" ]
libyaml
e6aa721cc0e5a48f408c52355559fd36780ba32a
88,055,476,297,575,040,000,000,000,000,000,000,000
37
Fix for https://bitbucket.org/xi/libyaml/issue/10/ https://bitbucket.org/xi/libyaml/issue/10/wrapped-strings-cause-assert-failure Commenting out the assert makes the scanner do the right thing and results in just a simple parse failure.
determ_context_t<history_t>::~determ_context_t() { delete[] newprectbl; delete[] histlevel; }
0
[ "CWE-787" ]
re2c
a3473fd7be829cb33907cb08612f955133c70a96
224,359,313,436,648,820,000,000,000,000,000,000,000
5
Limit maximum allowed NFA and DFA size. Instead of failing with an out of memory exception or crashing with a stack overflow, emit an error message and exit. This is a partial fix for bug #394 "Stack overflow due to recursion in src/dfa/dead_rules.cc", where re2c hit stack overflow on a counted repetition regexp with ...
static int nl80211_parse_coalesce_rule(struct cfg80211_registered_device *rdev, struct nlattr *rule, struct cfg80211_coalesce_rules *new_rule) { int err, i; const struct wiphy_coalesce_support *coalesce = rdev->wiphy.coalesce; struct nlattr *tb[NUM_NL80211_ATTR_COALESCE_RULE], *pat; int rem, p...
0
[ "CWE-120" ]
linux
f88eb7c0d002a67ef31aeb7850b42ff69abc46dc
21,754,830,546,540,154,000,000,000,000,000,000,000
90
nl80211: validate beacon head We currently don't validate the beacon head, i.e. the header, fixed part and elements that are to go in front of the TIM element. This means that the variable elements there can be malformed, e.g. have a length exceeding the buffer size, but most downstream code from this assumes that thi...
GF_Err stdp_Size(GF_Box *s) { GF_DegradationPriorityBox *ptr = (GF_DegradationPriorityBox *)s; ptr->size += (2 * ptr->nb_entries); return GF_OK; }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
109,345,119,002,042,080,000,000,000,000,000,000,000
7
prevent dref memleak on invalid input (#1183)
static int attach_recursive_mnt(struct mount *source_mnt, struct mount *dest_mnt, struct mountpoint *dest_mp, struct path *parent_path) { HLIST_HEAD(tree_list); struct mount *child, *p; struct hlist_node *n; int err; if (IS_MNT_SHARED(dest_mnt)) { err = invent_group_ids(source_mnt, true); if (err) ...
0
[ "CWE-269" ]
user-namespace
a6138db815df5ee542d848318e5dae681590fccd
282,279,434,562,356,100,000,000,000,000,000,000,000
53
mnt: Only change user settable mount flags in remount Kenton Varda <kenton@sandstorm.io> discovered that by remounting a read-only bind mount read-only in a user namespace the MNT_LOCK_READONLY bit would be cleared, allowing an unprivileged user to the remount a read-only mount read-write. Correct this by replacing t...
vrrp_debug_handler(vector_t *strvec) { vrrp_t *vrrp = LIST_TAIL_DATA(vrrp_data->vrrp); unsigned debug; if (!read_unsigned_strvec(strvec, 1, &debug, 0, 4, true)) report_config_error(CONFIG_GENERAL_ERROR, "(%s) Debug value '%s' not valid; must be between 0-4", vrrp->iname, FMT_STR_VSLOT(strvec, 1)); else vrrp->d...
0
[ "CWE-59", "CWE-61" ]
keepalived
04f2d32871bb3b11d7dc024039952f2fe2750306
102,897,994,263,330,300,000,000,000,000,000,000,000
10
When opening files for write, ensure they aren't symbolic links Issue #1048 identified that if, for example, a non privileged user created a symbolic link from /etc/keepalvied.data to /etc/passwd, writing to /etc/keepalived.data (which could be invoked via DBus) would cause /etc/passwd to be overwritten. This commit ...
struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc, const union sctp_addr *addr, const gfp_t gfp, const int peer_state) { struct sctp_transport *peer; struct sctp_sock *sp; unsigned short port; sp = sctp_sk(asoc->base.sk); /* AF_INET and AF_INET6 share common port fi...
1
[ "CWE-287" ]
linux-2.6
add52379dde2e5300e2d574b172e62c6cf43b3d3
254,469,762,198,362,900,000,000,000,000,000,000,000
135
sctp: Fix oops when INIT-ACK indicates that peer doesn't support AUTH If INIT-ACK is received with SupportedExtensions parameter which indicates that the peer does not support AUTH, the packet will be silently ignore, and sctp_process_init() do cleanup all of the transports in the association. When T1-Init timer is ex...
static int mpage_map_and_submit_extent(handle_t *handle, struct mpage_da_data *mpd, bool *give_up_on_write) { struct inode *inode = mpd->inode; struct ext4_map_blocks *map = &mpd->map; int err; loff_t disksize; int progress = 0; mpd->io_submit.io_end->offset = ((loff_t)map->m_lblk) << i...
0
[]
linux
8e4b5eae5decd9dfe5a4ee369c22028f90ab4c44
173,430,065,720,529,840,000,000,000,000,000,000,000
84
ext4: fail ext4_iget for root directory if unallocated If the root directory has an i_links_count of zero, then when the file system is mounted, then when ext4_fill_super() notices the problem and tries to call iput() the root directory in the error return path, ext4_evict_inode() will try to free the inode on disk, b...
void unwind(const typename ctx_t::history_t &hist, tag_path_t &path, hidx_t idx) { // Simple tags need only the last value, so in principle we could // increase the chance of mapping by recording only the last value. // But this would complicate unwind procedure quite a bit, and the // cases when it mak...
0
[ "CWE-787" ]
re2c
a3473fd7be829cb33907cb08612f955133c70a96
3,725,679,464,702,440,000,000,000,000,000,000,000
13
Limit maximum allowed NFA and DFA size. Instead of failing with an out of memory exception or crashing with a stack overflow, emit an error message and exit. This is a partial fix for bug #394 "Stack overflow due to recursion in src/dfa/dead_rules.cc", where re2c hit stack overflow on a counted repetition regexp with ...
std::string ZRtp::getMultiStrParams() { // the string will hold binary data - it's opaque to the application std::string str(""); char tmp[MAX_DIGEST_LENGTH + 1 + 1 + 1]; // hash length + cipher + authLength + hash if (inState(SecureState) && !multiStream) { // construct array that holds zrtpS...
0
[ "CWE-119" ]
ZRTPCPP
c8617100f359b217a974938c5539a1dd8a120b0e
324,198,556,808,727,500,000,000,000,000,000,000,000
16
Fix vulnerabilities found and reported by Mark Dowd - limit length of memcpy - limit number of offered algorithms in Hello packet - length check in PING packet - fix a small coding error
static bool io_dismantle_req(struct io_kiocb *req) { io_clean_op(req); if (req->io) kfree(req->io); if (req->file) io_put_file(req, req->file, (req->flags & REQ_F_FIXED_FILE)); if (req->flags & REQ_F_INFLIGHT) { struct io_ring_ctx *ctx = req->ctx; unsigned long flags; spin_lock_irqsave(&ctx->inflight_l...
0
[ "CWE-416" ]
linux
6d816e088c359866f9867057e04f244c608c42fe
235,651,850,225,066,280,000,000,000,000,000,000,000
22
io_uring: hold 'ctx' reference around task_work queue + execute We're holding the request reference, but we need to go one higher to ensure that the ctx remains valid after the request has finished. If the ring is closed with pending task_work inflight, and the given io_kiocb finishes sync during issue, then we need a...
LogLuvVSetField(TIFF* tif, uint32 tag, va_list ap) { static const char module[] = "LogLuvVSetField"; LogLuvState* sp = DecoderState(tif); int bps, fmt; switch (tag) { case TIFFTAG_SGILOGDATAFMT: sp->user_datafmt = (int) va_arg(ap, int); /* * Tweak the TIFF header so that the rest of libtiff knows what *...
0
[ "CWE-787" ]
libtiff
aaab5c3c9d2a2c6984f23ccbc79702610439bc65
186,113,661,229,071,870,000,000,000,000,000,000,000
57
* libtiff/tif_luv.c: fix potential out-of-bound writes in decode functions in non debug builds by replacing assert()s by regular if checks (bugzilla #2522). Fix potential out-of-bound reads in case of short input data.
static inline int compute_score(struct sock *sk, struct net *net, __be32 saddr, unsigned short hnum, __be16 sport, __be32 daddr, __be16 dport, int dif) { int score; struct inet_sock *inet; if (!net_eq(sock_net(sk), net) || udp_sk(sk)->udp_port_hash != hnum || ipv6_only_sock(sk)) return -1; sco...
0
[ "CWE-358" ]
linux
197c949e7798fbf28cfadc69d9ca0c2abbf93191
312,722,883,841,630,860,000,000,000,000,000,000,000
42
udp: properly support MSG_PEEK with truncated buffers Backport of this upstream commit into stable kernels : 89c22d8c3b27 ("net: Fix skb csum races when peeking") exposed a bug in udp stack vs MSG_PEEK support, when user provides a buffer smaller than skb payload. In this case, skb_copy_and_csum_datagram_iovec(skb, s...
TEST_F(DocumentSourceMatchTest, ShouldShowOptimizationsInExplainOutputWhenOptimized) { const auto match = DocumentSourceMatch::create(fromjson("{$and: [{a: 1}]}"), getExpCtx()); auto optimizedMatch = match->optimize(); auto expectedMatch = fromjson("{$match: {a:{$eq: 1}}}"); ASSERT_VALUE_EQ( ...
0
[]
mongo
b3107d73a2c58d7e016b834dae0acfd01c0db8d7
228,683,019,838,019,620,000,000,000,000,000,000,000
11
SERVER-59299: Flatten top-level nested $match stages in doOptimizeAt (cherry picked from commit 4db5eceda2cff697f35c84cd08232bac8c33beec)
EventBaseAborter(EventBase* eventBase, uint32_t timeoutMS) : AsyncTimeout(eventBase, AsyncTimeout::InternalEnum::INTERNAL), eventBase_(eventBase) { scheduleTimeout(timeoutMS); }
0
[ "CWE-125" ]
folly
c321eb588909646c15aefde035fd3133ba32cdee
152,713,614,826,582,900,000,000,000,000,000,000,000
5
Handle close_notify as standard writeErr in AsyncSSLSocket. Summary: Fixes CVE-2019-11934 Reviewed By: mingtaoy Differential Revision: D18020613 fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836
nouveau_sgdma_create_ttm(struct ttm_buffer_object *bo, uint32_t page_flags) { struct nouveau_drm *drm = nouveau_bdev(bo->bdev); struct nouveau_sgdma_be *nvbe; nvbe = kzalloc(sizeof(*nvbe), GFP_KERNEL); if (!nvbe) return NULL; if (drm->client.device.info.family < NV_DEVICE_INFO_V0_TESLA) nvbe->ttm.ttm.func = ...
0
[]
linux
5de5b6ecf97a021f29403aa272cb4e03318ef586
182,029,607,965,357,900,000,000,000,000,000,000,000
20
drm/ttm/nouveau: don't call tt destroy callback on alloc failure. This is confusing, and from my reading of all the drivers only nouveau got this right. Just make the API act under driver control of it's own allocation failing, and don't call destroy, if the page table fails to create there is nothing to cleanup here...
kdc_get_ticket_endtime(kdc_realm_t *kdc_active_realm, krb5_timestamp starttime, krb5_timestamp endtime, krb5_timestamp till, krb5_db_entry *client, krb5_db_entry *server, krb5_timest...
0
[ "CWE-476" ]
krb5
93b4a6306a0026cf1cc31ac4bd8a49ba5d034ba7
309,562,319,684,398,000,000,000,000,000,000,000,000
26
Fix S4U2Self KDC crash when anon is restricted In validate_as_request(), when enforcing restrict_anonymous_to_tgt, use client.princ instead of request->client; the latter is NULL when validating S4U2Self requests. CVE-2016-3120: In MIT krb5 1.9 and later, an authenticated attacker can cause krb5kdc to dereference a ...
long kvm_arch_vcpu_async_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg) { struct kvm_vcpu *vcpu = filp->private_data; void __user *argp = (void __user *)arg; switch (ioctl) { case KVM_S390_IRQ: { struct kvm_s390_irq s390irq; if (copy_from_user(&s390irq, argp, sizeof(s390irq))) re...
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
329,651,889,413,251,880,000,000,000,000,000,000,000
27
KVM: Fix out of range accesses to memslots Reset the LRU slot if it becomes invalid when deleting a memslot to fix an out-of-bounds/use-after-free access when searching through memslots. Explicitly check for there being no used slots in search_memslots(), and in the caller of s390's approximation variant. Fixes: 369...
* recovery timer fires then FAST_IO_FAIL is returned. The caller * should pass this error value to the scsi eh. */ int iscsi_block_scsi_eh(struct scsi_cmnd *cmd) { struct iscsi_cls_session *session = starget_to_session(scsi_target(cmd->device)); unsigned long flags; int ret = 0; spin_lock_irqsave(&session->l...
0
[ "CWE-787" ]
linux
ec98ea7070e94cc25a422ec97d1421e28d97b7ee
288,492,732,774,258,230,000,000,000,000,000,000,000
20
scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE As the iSCSI parameters are exported back through sysfs, it should be enforcing that they never are more than PAGE_SIZE (which should be more than enough) before accepting updates through netlink. Change all iSCSI sysfs attributes to use sysfs_emit(). Cc:...
PHP_LIBXML_API int php_libxml_increment_doc_ref(php_libxml_node_object *object, xmlDocPtr docp) { int ret_refcount = -1; if (object->document != NULL) { object->document->refcount++; ret_refcount = object->document->refcount; } else if (docp != NULL) { ret_refcount = 1; object->document = emalloc(sizeof(php...
0
[]
php-src
f15f8fc573eb38c3c73e23e0930063a6f6409ed4
50,151,715,622,014,680,000,000,000,000,000,000,000
17
Fix #79971: special character is breaking the path in xml function The libxml based XML functions accepting a filename actually accept URIs with possibly percent-encoded characters. Percent-encoded NUL bytes lead to truncation, like non-encoded NUL bytes would. We catch those, and let the functions fail with a respe...
Bool gf_filter_reconf_output(GF_Filter *filter, GF_FilterPid *pid) { GF_Err e; GF_FilterPidInst *src_pidi; GF_FilterPid *src_pid; gf_mx_p(filter->tasks_mx); src_pidi = gf_list_get(filter->input_pids, 0); src_pid = src_pidi->pid; if (filter->is_pid_adaptation_filter) { //do not remove from destination_filters,...
0
[ "CWE-787" ]
gpac
da37ec8582266983d0ec4b7550ec907401ec441e
8,780,481,401,380,146,000,000,000,000,000,000,000
48
fixed crashes for very long path - cf #1908
LogRecordingSink::LogRecordingSink(Logger::DelegatingLogSinkSharedPtr log_sink) : Logger::SinkDelegate(log_sink) {}
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
171,066,679,138,469,100,000,000,000,000,000,000,000
2
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
MYSQL *mysql_connect_ssl_check(MYSQL *mysql_arg, const char *host, const char *user, const char *passwd, const char *db, uint port, const char *unix_socket, ulong client_flag, my_bool ssl_required...
0
[ "CWE-319" ]
mysql-server
060b1eadf4913f7066484ea34ec62feead1bca44
308,840,318,684,814,700,000,000,000,000,000,000,000
36
BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION MYSQL_OPT_SSL_MODE option introduced. It is set in case of --ssl-mode=REQUIRED and permits only SSL connection. (cherry picked from commit 3b2d28578c526f347f5cfe763681eff365731f99)
xfrm_tmpl_resolve(struct xfrm_policy **pols, int npols, const struct flowi *fl, struct xfrm_state **xfrm, unsigned short family) { struct xfrm_state *tp[XFRM_MAX_DEPTH]; struct xfrm_state **tpp = (npols > 1) ? tp : xfrm; int cnx = 0; int error; int ret; int i; for (i = 0; i < npols; i++) { if (cnx + pols[...
0
[ "CWE-125" ]
ipsec
7bab09631c2a303f87a7eb7e3d69e888673b9b7e
204,078,694,408,154,230,000,000,000,000,000,000,000
36
xfrm: policy: check policy direction value The 'dir' parameter in xfrm_migrate() is a user-controlled byte which is used as an array index. This can lead to an out-of-bound access, kernel lockup and DoS. Add a check for the 'dir' value. This fixes CVE-2017-11600. References: https://bugzilla.redhat.com/show_bug.cgi?...
static void* clone_sockaddr_attr(pj_pool_t *pool, const void *src) { pj_stun_sockaddr_attr *dst = PJ_POOL_ALLOC_T(pool, pj_stun_sockaddr_attr); pj_memcpy(dst, src, sizeof(pj_stun_sockaddr_attr)); return (void*)dst; }
0
[ "CWE-191" ]
pjproject
15663e3f37091069b8c98a7fce680dc04bc8e865
121,558,462,404,442,220,000,000,000,000,000,000,000
6
Merge pull request from GHSA-2qpg-f6wf-w984
char * copy_fifo_list (sizep) int *sizep; { char *ret; if (nfds == 0 || totfds == 0) { if (sizep) *sizep = 0; return (char *)NULL; } if (sizep) *sizep = totfds; ret = (char *)xmalloc (totfds); return (memcpy (ret, dev_fd_list, totfds));
0
[ "CWE-20" ]
bash
4f747edc625815f449048579f6e65869914dd715
289,888,836,798,397,900,000,000,000,000,000,000,000
17
Bash-4.4 patch 7
static int insert_free_dqentry(struct qtree_mem_dqinfo *info, char *buf, uint blk) { char *tmpbuf = kmalloc(info->dqi_usable_bs, GFP_NOFS); struct qt_disk_dqdbheader *dh = (struct qt_disk_dqdbheader *)buf; int err; if (!tmpbuf) return -ENOMEM; dh->dqdh_next_free = cpu_to_le32(info->dqi_free_entry); d...
0
[ "CWE-416" ]
linux
9bf3d20331295b1ecb81f4ed9ef358c51699a050
274,527,374,609,078,600,000,000,000,000,000,000,000
32
quota: check block number when reading the block in quota file The block number in the quota tree on disk should be smaller than the v2_disk_dqinfo.dqi_blocks. If the quota file was corrupted, we may be allocating an 'allocated' block and that would lead to a loop in a tree, which will probably trigger oops later. Thi...
xsltParseAttrXSLTVersion(xsltCompilerCtxtPtr cctxt, xmlNodePtr node, int instrCategory) { xmlChar *value; xmlAttrPtr attr; if ((cctxt == NULL) || (node == NULL)) return(-1); if (instrCategory == XSLT_ELEMENT_CATEGORY_XSLT) attr = xmlHasNsProp(node, BAD_CAST "version", NULL); else attr =...
0
[]
libxslt
7089a62b8f133b42a2981cf1f920a8b3fe9a8caa
221,761,031,760,390,360,000,000,000,000,000,000,000
61
Crash compiling stylesheet with DTD * libxslt/xslt.c: when a stylesheet embbeds a DTD the compilation process could get seriously wrong
DataRcvd(tcps_sess_t *pThis, char *pData, const size_t iLen) { multi_submit_t multiSub; smsg_t *pMsgs[NUM_MULTISUB]; struct syslogTime stTime; time_t ttGenTime; char *pEnd; unsigned nMsgs = 0; DEFiRet; ISOBJ_TYPE_assert(pThis, tcps_sess); assert(pData != NULL); assert(iLen > 0); datetime.getCurrTime(&stTim...
0
[ "CWE-787" ]
rsyslog
89955b0bcb1ff105e1374aad7e0e993faa6a038f
200,064,034,419,278,660,000,000,000,000,000,000,000
33
net bugfix: potential buffer overrun
static long get_instantiation_keyring(key_serial_t ringid, struct request_key_auth *rka, struct key **_dest_keyring) { key_ref_t dkref; *_dest_keyring = NULL; /* just return a NULL pointer if we weren't asked to make a link */ if (ringid == 0) return 0; /* if a specific keyring is nominate...
0
[ "CWE-347" ]
linux
ee8f844e3c5a73b999edf733df1c529d6503ec2f
154,096,117,416,272,100,000,000,000,000,000,000,000
33
KEYS: Disallow keyrings beginning with '.' to be joined as session keyrings This fixes CVE-2016-9604. Keyrings whose name begin with a '.' are special internal keyrings and so userspace isn't allowed to create keyrings by this name to prevent shadowing. However, the patch that added the guard didn't fix KEYCTL_JOIN_...
psutil_proc_environ(PyObject *self, PyObject *args) { int pid; PyObject *py_retdict = PyDict_New(); PyObject *py_key = NULL; PyObject *py_val = NULL; struct procsinfo procbuf; long env_max; char *envbuf = NULL; char *curvar = NULL; char *separator = NULL; int ret; if (py_ret...
0
[ "CWE-415" ]
psutil
7d512c8e4442a896d56505be3e78f1156f443465
316,895,354,238,411,260,000,000,000,000,000,000,000
66
Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616) These files contain loops that convert system data into python objects and during the process they create objects and dereference their refcounts after they have been added to the resulting list. However, in case of errors during the creat...
evdev_accel_config_set_speed(struct libinput_device *device, double speed) { struct evdev_device *dev = evdev_device(device); if (!filter_set_speed(dev->pointer.filter, speed)) return LIBINPUT_CONFIG_STATUS_INVALID; return LIBINPUT_CONFIG_STATUS_SUCCESS; }
0
[ "CWE-134" ]
libinput
a423d7d3269dc32a87384f79e29bb5ac021c83d1
59,812,764,972,652,490,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...
char *lxc_append_paths(const char *first, const char *second) { size_t len = strlen(first) + strlen(second) + 1; const char *pattern = "%s%s"; char *result = NULL; if (second[0] != '/') { len += 1; pattern = "%s/%s"; } result = calloc(1, len); if (!result) return NULL; snprintf(result, len, pattern, fi...
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
315,090,978,535,475,300,000,000,000,000,000,000,000
18
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
uint pack_length_to_packflag(uint type) { switch (type) { case 1: return f_settype((uint) MYSQL_TYPE_TINY); case 2: return f_settype((uint) MYSQL_TYPE_SHORT); case 3: return f_settype((uint) MYSQL_TYPE_INT24); case 4: return f_settype((uint) MYSQL_TYPE_LONG); case 8: return f_settype((uint) MYSQL_...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
20,034,166,798,837,822,000,000,000,000,000,000,000
11
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...
CIFSSMBWrite(const int xid, struct cifs_io_parms *io_parms, unsigned int *nbytes, const char *buf, const char __user *ubuf, const int long_op) { int rc = -EACCES; WRITE_REQ *pSMB = NULL; WRITE_RSP *pSMBr = NULL; int bytes_returned, wct; __u32 bytes_sent; __u16 byte_count; __u32 pid = io_parms->pid; ...
0
[ "CWE-362", "CWE-119", "CWE-189" ]
linux
9438fabb73eb48055b58b89fc51e0bc4db22fabd
50,755,654,699,247,250,000,000,000,000,000,000,000
125
cifs: fix possible memory corruption in CIFSFindNext The name_len variable in CIFSFindNext is a signed int that gets set to the resume_name_len in the cifs_search_info. The resume_name_len however is unsigned and for some infolevels is populated directly from a 32 bit value sent by the server. If the server sends a v...
static void __input_release_device(struct input_handle *handle) { struct input_dev *dev = handle->dev; struct input_handle *grabber; grabber = rcu_dereference_protected(dev->grab, lockdep_is_held(&dev->mutex)); if (grabber == handle) { rcu_assign_pointer(dev->grab, NULL); /* Make sure input_pass_event...
0
[ "CWE-703", "CWE-787" ]
linux
cb222aed03d798fc074be55e59d9a112338ee784
291,991,526,608,025,300,000,000,000,000,000,000,000
17
Input: add safety guards to input_set_keycode() If we happen to have a garbage in input device's keycode table with values too big we'll end up doing clear_bit() with offset way outside of our bitmaps, damaging other objects within an input device or even outside of it. Let's add sanity checks to the returned old keyc...
void plugin_opt_set_limits(struct my_option *options, const struct st_mysql_sys_var *opt) { options->sub_size= 0; switch (opt->flags & (PLUGIN_VAR_TYPEMASK | PLUGIN_VAR_UNSIGNED | PLUGIN_VAR_THDLOCAL)) { /* global system variables */ case PLUGIN_VAR_INT: O...
0
[ "CWE-416" ]
server
c05fd700970ad45735caed3a6f9930d4ce19a3bd
83,055,381,409,642,745,000,000,000,000,000,000,000
108
MDEV-26323 use-after-poison issue of MariaDB server
usage(void) { const char *p; p = lafe_getprogname(); fprintf(stderr, "Brief Usage:\n"); fprintf(stderr, " List: %s -it < archive\n", p); fprintf(stderr, " Extract: %s -i < archive\n", p); fprintf(stderr, " Create: %s -o < filenames > archive\n", p); fprintf(stderr, " Help: %s --help\n", p); exit(1)...
0
[ "CWE-703", "CWE-22" ]
libarchive
59357157706d47c365b2227739e17daba3607526
122,700,148,666,191,140,000,000,000,000,000,000,000
13
Add ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS option This fixes a directory traversal in the cpio tool.
TEST(UriSuite, TestUriHostIpSix2) { UriParserStateA stateA; UriUriA uriA; stateA.uri = &uriA; // 0 4 0 3 01 45 const char * const input = "http" "://" "[::1]"; ASSERT_TRUE(0 == uriParseUriA(&stateA, input)); ASSERT_TRUE(uriA.hostText.first == input + 4 + 3 + 1); ASSERT_TR...
0
[ "CWE-125" ]
uriparser
cef25028de5ff872c2e1f0a6c562eb3ea9ecbce4
176,560,338,010,894,400,000,000,000,000,000,000,000
16
Fix uriParse*Ex* out-of-bounds read
static int call_netdevice_notifier(struct notifier_block *nb, unsigned long val, struct net_device *dev) { struct netdev_notifier_info info = { .dev = dev, }; return nb->notifier_call(nb, val, &info); }
0
[ "CWE-416" ]
linux
a4270d6795b0580287453ea55974d948393e66ef
229,919,891,458,361,500,000,000,000,000,000,000,000
9
net-gro: fix use-after-free read in napi_gro_frags() If a network driver provides to napi_gro_frags() an skb with a page fragment of exactly 14 bytes, the call to gro_pull_from_frag0() will 'consume' the fragment by calling skb_frag_unref(skb, 0), and the page might be freed and reused. Reading eth->h_proto at the en...
sg_start_req(Sg_request *srp, unsigned char *cmd) { int res; struct request *rq; struct scsi_request *req; Sg_fd *sfp = srp->parentfp; sg_io_hdr_t *hp = &srp->header; int dxfer_len = (int) hp->dxfer_len; int dxfer_dir = hp->dxfer_direction; unsigned int iov_count = hp->iovec_count; Sg_scatter_hold *req_schp = ...
0
[ "CWE-119" ]
linux
bf33f87dd04c371ea33feb821b60d63d754e3124
31,504,205,099,867,647,000,000,000,000,000,000,000
122
scsi: sg: check length passed to SG_NEXT_CMD_LEN The user can control the size of the next command passed along, but the value passed to the ioctl isn't checked against the usable max command size. Cc: <stable@vger.kernel.org> Signed-off-by: Peter Chang <dpf@google.com> Acked-by: Douglas Gilbert <dgilbert@interlog.co...
timer_create(clockid_t clock_id, void *sevp, timer_t *timer_id) { if (clock_id != CLOCK_MONOTONIC) return -1; if (sevp) return -1; /* setitimer only supports one timer */ *timer_id = 0; return 0; }
0
[ "CWE-416" ]
owntone-server
246d8ae0cef27377e5dfe9ee3ad87e864d6b6266
58,551,578,486,758,890,000,000,000,000,000,000,000
12
[misc] Fix use-after-free in net_bind() Thanks to Ba Jinsheng for reporting this bug
GF_Err gf_isom_change_generic_sample_description(GF_ISOFile *movie, u32 trackNumber, u32 StreamDescriptionIndex, GF_GenericSampleDescription *udesc) { GF_TrackBox *trak; GF_Err e; GF_GenericVisualSampleEntryBox *entry; e = CanAccessMovie(movie, GF_ISOM_OPEN_WRITE); if (e) return e; trak = gf_isom_get_track_from...
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
150,690,121,414,149,180,000,000,000,000,000,000,000
83
fixed #1706
void stts_del(GF_Box *s) { GF_TimeToSampleBox *ptr = (GF_TimeToSampleBox *)s; if (ptr->entries) gf_free(ptr->entries); gf_free(ptr); }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
46,468,635,491,701,710,000,000,000,000,000,000,000
6
prevent dref memleak on invalid input (#1183)
static int check_return_code(struct bpf_verifier_env *env) { struct tnum enforce_attach_type_range = tnum_unknown; const struct bpf_prog *prog = env->prog; struct bpf_reg_state *reg; struct tnum range = tnum_range(0, 1); enum bpf_prog_type prog_type = resolve_prog_type(env->prog); int err; struct bpf_func_state ...
0
[ "CWE-787" ]
linux
64620e0a1e712a778095bd35cbb277dc2259281f
334,642,866,874,244,560,000,000,000,000,000,000,000
131
bpf: Fix out of bounds access for ringbuf helpers Both bpf_ringbuf_submit() and bpf_ringbuf_discard() have ARG_PTR_TO_ALLOC_MEM in their bpf_func_proto definition as their first argument. They both expect the result from a prior bpf_ringbuf_reserve() call which has a return type of RET_PTR_TO_ALLOC_MEM_OR_NULL. Meani...
sds sdstrim(sds s, const char *cset) { char *start, *end, *sp, *ep; size_t len; sp = start = s; ep = end = s+sdslen(s)-1; while(sp <= end && strchr(cset, *sp)) sp++; while(ep > sp && strchr(cset, *ep)) ep--; len = (sp > ep) ? 0 : ((ep-sp)+1); if (s != sp) memmove(s, sp, len); s[len]...
0
[ "CWE-190" ]
redis
d32f2e9999ce003bad0bd2c3bca29f64dcce4433
113,024,077,108,608,950,000,000,000,000,000,000,000
14
Fix integer overflow (CVE-2021-21309). (#8522) On 32-bit systems, setting the proto-max-bulk-len config parameter to a high value may result with integer overflow and a subsequent heap overflow when parsing an input bulk (CVE-2021-21309). This fix has two parts: Set a reasonable limit to the config parameter. A...
static int proc_tid_io_accounting(struct task_struct *task, char *buffer) { return do_io_accounting(task, buffer, 0); }
0
[]
linux
0499680a42141d86417a8fbaa8c8db806bea1201
287,806,029,482,141,180,000,000,000,000,000,000,000
4
procfs: add hidepid= and gid= mount options Add support for mount options to restrict access to /proc/PID/ directories. The default backward-compatible "relaxed" behaviour is left untouched. The first mount option is called "hidepid" and its value defines how much info about processes we want to be available for non...
int memhp_online_type_from_str(const char *str) { int i; for (i = 0; i < ARRAY_SIZE(online_type_to_str); i++) { if (sysfs_streq(str, online_type_to_str[i])) return i; } return -EINVAL; }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
282,396,985,296,906,730,000,000,000,000,000,000,000
10
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
mark_all_guards_maybe_reachable(guard_selection_t *gs) { tor_assert(gs); SMARTLIST_FOREACH_BEGIN(gs->sampled_entry_guards, entry_guard_t *, guard) { mark_guard_maybe_reachable(guard); } SMARTLIST_FOREACH_END(guard); }
0
[ "CWE-200" ]
tor
665baf5ed5c6186d973c46cdea165c0548027350
220,369,221,607,096,300,000,000,000,000,000,000,000
8
Consider the exit family when applying guard restrictions. When the new path selection logic went into place, I accidentally dropped the code that considered the _family_ of the exit node when deciding if the guard was usable, and we didn't catch that during code review. This patch makes the guard_restriction_t code ...
static int nl80211_disassociate(struct sk_buff *skb, struct genl_info *info) { struct cfg80211_registered_device *rdev = info->user_ptr[0]; struct net_device *dev = info->user_ptr[1]; const u8 *ie = NULL, *bssid; int ie_len = 0, err; u16 reason_code; bool local_state_change; if (dev->ieee80211_ptr->conn_owner_n...
0
[ "CWE-120" ]
linux
f88eb7c0d002a67ef31aeb7850b42ff69abc46dc
243,741,205,383,293,560,000,000,000,000,000,000,000
47
nl80211: validate beacon head We currently don't validate the beacon head, i.e. the header, fixed part and elements that are to go in front of the TIM element. This means that the variable elements there can be malformed, e.g. have a length exceeding the buffer size, but most downstream code from this assumes that thi...